在SyntaxHighlighter的当前主题样式文件中找到
.syntaxhighlighter .line {
white-space: pre !important;
}
将其注释或删除
.syntaxhighlighter .line {
/*white-space: pre !important;*/
}就可以实现自动换行。
例如:
.syntaxhighlighter .line {
right: auto !important;
text-align: left !important;
top: auto !important;
vertical-align: baseline !important;
width: auto !important;
box-sizing: content-box !important;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
font-size: 1em !important;
min-height: inherit !important;
min-height: auto !important;
}

你的也没有自动换行啊??
因为我没改。。。你改了就知道了
行号会显示不正常的~
不会的,换行的那一行,显示两行,但第二行是没有行号的~