How do I highlight code?
Take a look at http://alexgorbatchev.com/wiki/SyntaxHighlighter for the documentation on using the Syntax Highlighter tool.
Basic usage is similar to: <pre class="brush:php">...PHP code...</pre>
I get an error saying “Can’t find brush for: xxx”
The most likely issue is that the specified brush is not available as part of the plugin install, or that the brush you specified is not spelled correctly.
Why does my content containing “<” and “>” get messed up?
I think this is an underlying issue with the JavaScript libraries.
Highlighting code like this:
<pre class="brush: java"> List<String> myList = new ArrayList<String>(); </pre>
Can result in:
ListmyList = new ArrayList ();
Replace the < characters with their entity escape of < to get the desired result.
<pre class="brush: java"> List<String> myList = new ArrayList<String>(); </pre>
creates
List<String> myList = new ArrayList<String>();
Note that this issue only happens if you are using the <pre /> tags to surround the highlighted code.
Why “Syntax Highlighter MT”?
There are several plugins already that are named Syntax Highlighter, or some variant. I added “MT” (for Megatome Technologies – my company) to the name to make it unique.