Page 2 of 2

Re: code highlighting

Posted: Thu Sep 10, 2009 9:46 am
by benw
Apparently the "board attachment quota has been reached". Once this is fixed I'll upload the file, otherwise provide me with an email address and I'll email it instead.
Can you give it another try now? Its been increased.

Regards
Ben

Re: code highlighting

Posted: Thu Sep 10, 2009 1:15 pm
by allistar
Thanks. Here is the attachment.

Re: code highlighting

Posted: Thu Feb 28, 2013 3:34 am
by ghosttie
A Jade syntax highlighter function would need to be written in PHP and produce html output similar to http://php.net/manual/en/function.highlight-string.php, outputting only <span> and <br /> html tags in XHTML 1.0 Strict and use css classes for colorization.
It's been a long time (more than three years) since this topic was discussed - I kept putting it off because I was daunted by the prospect of writing a parser, especially since it feels like duplicating work other people have done.

I believe phpBB uses GeSHi for syntax highlighting - if this is the case then all we need to do to add a new language is to specify what the keywords, string delimiters, comment delimiters etc. are and GeSHi should take care of the rest.

If you can confirm that this board uses GeSHi then I (or anyone else) should be able to add JADE code highlighting very quickly. I already have a list of keywords etc. from when I created a JADE code highlighting syntax file for EditPlus.