Monday, 14 June 2010

Syntax Highlighter Success

Finally, I managed to get SyntaxHighlighter working.

I had tried a few things previously, but it seems that some of the tutorials I had seen were based on older versions. The joy arrived when I found this post.

Now I can post code snippets in a way which is actually readable!

COUNT(dbid) as TotalConnections
dbid > 0


I'm still using Stanley Shilov's utility to escape my HTML so that I can post using these simple tags:

<pre class="brush: html">


José Guerrero said...

But, it doesn't work now because Alex Gorbatchev would like a donation to keep development of his project active. I had the same problem but I changed to where Syntax Highlighter is included using sourcecode tags (between square brackets) with the adequate filter for any laguage. For example, in python is:

[sourcecode language="py"]
your code here

Have a nice day!

Phil said...

That's interesting - thanks for the information.

I'll check it out since I did notice that some of the JS behaviour had stopped working...