I am using SyntaxHighlighter on my website and it is acting very strange. I put my codes in <pre>s and used SyntaxHighlighter.all(), and what I got are in every single codes, it inserted 1~2 extra lines.
Where’s the problem? I checked everything and everything is fine. Please help.
I don’t know about SyntaxHighlighter, but in general, the
<pre>tag works effective immediately, LF and CR everything. When Syntax Highlighter does its conversion, it might be respecting these line feeds as well. For example:vs.
We’re used to writing well-formatted and well-indented code, but with pre tags you have to make an exception. Looking at your source code, I think you’re doing it the top way.