I've started to use SyntaxHighlighter for my syntax highlighting needs.
However, I've realized that it doesn't work on mobile. Similarly, it often doesn't work on desktop browsers, but sometimes it does.
It often defaults back to the <pre>
styles because SyntaxHighlighter doesn't transform the <pre>
into its own styled <div>
:
But sometimes it does what it's supposed to do:
(You can see this effect at my website, The Homework Life.)
I've made sure to include the scripts for the syntaxhighlighter before my script to call it, and my script is run on the page load.
However, if I call SyntaxHighlighter.all()
or SyntaxHighlighter.highlight()
after the page load (using Chrome's developer console), it transforms it. But why isn't it doing it automatically? Thanks.