eMail highlighting for GeSHi


This posting is outdated. DokuWiki comes with its own GeSHi e-mail highlighter since some years. Below example shows what it produces. Unfortunately, it does not support clickable URLs. Besides, my own code is slightly broken. (2013-08-03)

DokuWiki, the wiki this Wiki is running on :-) uses the Generic Syntax Highlighter GeSHi to put color on listings of programming source code, the so-called syntax highlighting.

I wrote a first draft version of a highlighter for e-mail messages (RFC 822 style) which can be used with GeSHi. If you want to try it download email.phps, rename it to email.php and copy it to your ''geshi' folder. Of course, you might want to check that the permissions are correct.

In DokuWiki this can be used for something like

As one can see it can't do everything. Either due to restrictions on GeSHi's side or my ignorance I found no way to i.a.

Anyway, it does help me and maybe others can help or find some use for it.

Maybe, I should note that GeSHi offers more flexibility by its use of regular expressions but nevertheless it interferes with the highlighting of numbers which is enabled in DokuWiki, and there seems to be no way of disabling it from within a language file.