-
- 16 Posts
Another is GeSHi syntax highlighter class.
-
- 3,250 Posts
GeSHi is not dynamic where as Helene is.
-
- 1,131 Posts
I’ve played around with Helene a bit. Only thing I really don’t like about it is that you have to have your PHP code within the standard PHP delimiters for it to work (i.e. <?php ?>). Since most snippets and stuff don’t use the delimiters then Helene won’t highlight the code the way it’s supposed to. Only workaround I can think of is to hack Helene to make it use PHP highlighting for all code it sees. Hmm...
Jeff Whitfield
"I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
-
- 302 Posts
Or hack it in such a way that it strips the <?php and ?> tags. Upon sending to the database. Or... both... now that would be slick. The reason I came up with this hair brained scheme is becuase I do all my snippet work in Dreamweaver and use <?php ?> tags at the beginning and end so Dreamweaver’s syntax highlighting will work. If Helene automatically stripped them out then I could Ctrl-A all my code and paste into Helene (instead of highlighting everything below <?php and above ?> - which is a pain).
Oooohh... or how about this (no hacking of Helene involved)!!!!
What if the parser just took a look at snippet code by default and stripped the <?php and ?> tags out at runtime... if it existed. That would allow developers to use it or not at their preference... Hmm...
Standard Disclaimer
I could be totally wrong.
-
- 1,131 Posts
That’s a pretty good idea! Perhaps the limit should be that you can paste a snippet, plugin, module, etc. with PHP but you must make sure that it only has one opening delimiter at the beginning of the code and one closing delimiter at the end. That way we could always have the delimiters stripped once the value is saved back to the database. This should be pretty easy to do. I’ll play with the idea and see how it’ll all work.
Jeff Whitfield
"I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
-
- 302 Posts
Stripping at the beginning and end only is exactly what I had in mind.
Standard Disclaimer
I could be totally wrong.