You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whitespace inside <pre> elements is always respected by the browser, and output as-is. A newline is treated the same as any other whitespace character.
Basically, when I use a code snippet like below, that I've likely pasted in from another document:
Line 1 (using
hljs.initLineNumbersOnLoad();
) will always be blank, as it registers the line break after the<code>
tag as a new line.It's easy enough to fix, it's just a little annoying.
Describe the solution you'd like
Optionally remove the first line from the code block if it's empty.
Describe alternatives you've considered
Technically you can do this:
But it looks a little gross to me idk.
Not a high priority by any means, but I think it would feel nice :)
The text was updated successfully, but these errors were encountered: