I read a thread that recommended incorporating GeSHi for generic syntax highlighting.

I added code that uses GeSHi and an admin page. The admin page lets the user enable/disable geshi, set the page to geshi and set a default language. There is also support code that allows the user to adjust the language on the fly by addin it to the code tag, like this .

I basically left all the existing codefilter code alone so if geshi is disabled it should bahave just as it used to.

codefilter-geshi.patch8.04 KBvfilby


vfilby’s picture

Only now that I have looked through all the issues I see a wayward link to vim color.

Vim color depends on perl and a perl package where my patch uses a php package so I think they both have merits and uses.

I didn't find this page when searching for 'syntax highlighting' I only found the page requesting the feature in codefilter. So before you flame me for duplicate modules write a better search algorithm or do something else useful with your time.



JohnAlbin’s picture

Status: Needs review » Closed (won't fix)

This module should be kept PHP only.

See also: http://drupal.org/project/geshifilter

guardian’s picture

This module should be kept PHP only.

I tend to disagree. I don't know about the quality of the patch but I would like to see good reasons to restrict code filter to PHP only. Otherwise maybe a less generic name should be used for this module ?

JohnAlbin’s picture

I’m not a maintainer of this module, but there are 3 reasons for keeping this module PHP only.

  • The drupal.org website uses it and they only need PHP.
  • PHP syntax highlighting is handled by an internal PHP function; any other language would require it's own parser.
  • There is already a Geshi filter: http://drupal.org/project/geshifilter

As far as changing the name, it’s first-come-first-serve for getting names on drupal.org CVS. And I'm pretty sure that the maintainers won’t change the name since the module has been around for so long; it would cause more confusion to rename it than to keep it the same.

Gregory, if you feel the project homepage should more clearly specify this is a PHP only syntax highlighter, open a new issue; I'll support you.