chatcraft.org icon indicating copy to clipboard operation
chatcraft.org copied to clipboard

Fix source code wrapping, indenting

Open humphd opened this issue 1 year ago • 0 comments

There are a few bugs in how source code is being displayed with the line numbers and wrapping.

First, wrapping is covering the line number gutter:

Screenshot 2024-01-08 at 8 54 25 PM

Second, the line number area's width changes depending on the number of digits in the line number. Here's an example, where I've highlighted the line numbers to show the indent being different as you go from 9 to 10:

Screenshot 2024-01-08 at 8 56 42 PM

The React component we're using to do the syntax highlighting is not being updated any more, so we'll have to do our own CSS hacks. I have a few there now, but it needs to be better.

humphd avatar Jan 09 '24 02:01 humphd