50
SyntaxHighlighter
i was searching for a way to display code in my blog if i needed to and i found this javascript syntax highlighter by Alex Gorbatchev that did the job really well !

just include the javascript files and css styles :









then enclose your content inside pre tags with a brush class attribute :



link




as i was already converting \n characters to html br tags they were also showing in the code output. i just had to edit shCore.js and change the value of stripBrs from false to true :


stripBrs : false,


to


stripBrs : true,