Line Number doesn't render all the way #7639
-
Has anyone seen this behavior? What I have is:
There doesn't seem to be a line limit. For example if my code block was 1000 lines it stops number at 950, or if I had 500 lines, it stops at 480... it's inconsistent, but only happens with code blocks with many lines. It's fine for a codeblock with say 20 lines. I am wondering if there was a max line limit before it starts behaving this way. (Apologies for the , I was trying to escape the backticks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello @kenny-chua, Given your comment that the line nums disappear almost at random, perhaps it's some sort of internal "processed token" limitation of the HTML formatter used by the Highlight extension, or maybe a combination of more extensions being enabled. I don't have any more leads at the moment, so I can only recommend you to prepare a minimal reproduction of the issue using the guide below, as in, provide the minimal configuration needed to showcase the issue: EDIT:
|
Beta Was this translation helpful? Give feedback.
Aha, this CSS wraps the text when it's too long:
and the line numbers are static, generated in HTML, what happens is that you increase the amount of lines in the code block, while not adjusting the line numbers, so in the end they cut off at random points, because different files add more lines than the other.
I don't think you can fix it with pure CSS 🤔 The only idea I have currently would be to use JavaScript to fetch the calculated height of the newly wrapped line and then overri…