SyntaxHighLighter: auto line break with pre wrap








Add the following css into your html page(blog template):
<style type="text/css">
body .syntaxhighlighter .line {
    white-space: pre-wrap !important;
}
</style>

NOTE:

On SyntaxHighLither 3.0.83, enable the above css will make the line numbers go wrong. So better set gutter: false to disable the line numbers if you have long lines in the code block.

SEE ALSO:

  1. http://stackoverflow.com/questions/6286733/automatic-line-break-in-js-syntaxhighlighter
  2. https://bitbucket.org/alexg/syntaxhighlighter/issue/182/version-3-making-code-wrap
  3. http://blog.2k1y.com/2011/05/how-to-add-syntaxhighlighter-3083-on.html
  4. SyntaxHighLighter: auto line break with pre wrap
  5. SyntaxHighlighter on Blogger: how to enable border



1 comment:

  1. Wow, great website! I absolutely appreciated the articles material! Please keep it up writing about these postings, I’m able to more likely be subscribing subsequent!
    website design

    ReplyDelete