SyntaxHighlighter 表现得很有趣
我在我的 SyntaxHighlighter .php" rel="nofollow">网站,它的行为非常奇怪。我将代码放在
中并使用
SyntaxHighlighter.all()
,我得到的是在每一个代码中,它插入了 1~2 行额外的行。
问题出在哪里?我检查了一切,一切都很好。请帮忙。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道 SyntaxHighlighter,但一般来说,
vs.
我们习惯于编写格式良好且缩进良好的代码,但使用 pre 标记时,您必须例外。看看你的源代码,我认为你正在以最好的方式做这件事。
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.