The Drupal module is pretty much done now. Here you can see the settings form and some example source (Java, PHP, Perl and Python) highlighted in Eclipse and Emacs flavors:

Maybe I'll add a checkbox for minimal mode tomorrow, but that's about it.
Syntax: <shjs:language>...</shjs> (extra spaces or upper case letters won't work)
The tag checking is very strict. There is only one way to write it. I had to do it like that since preg_match_all killed my test server about 50 times (it worked fine for a handfull of lines tho). Therefore I switched to amazingly silly strpos/substr/str_replace code. On the flip side it's faster and uses less memory, since its a straight non-recursive loop.
I hope this turns out to be a good strategy for shared hosting. I mean the filter is about as simple as it can get and all the work is done on the client side.
I'm not really happy yet with the way the language specific js files are loaded, but maybe I'll find a nicer solution for that.
Comments
Post new comment