views:

240

answers:

3

Hello,

Can you recommend a drupal module that provides a syntax highlighting input filter? Good coverage of less known programming languages would be nice.

+6  A: 

GeSHi is pretty much the gold standard in PHP, and there's a Drupal module for it.

ceejayoz
I use GeSHI on my own site and it works very well. There are a TON of supported languages.
Bevan
+1  A: 

Drupal.org uses code filter. It is very simple to set up and has no external dependencies (like GeSHI does).

If you only need to highlight PHP code, I'd recommend code filter, since GeSHI takes a lot of time to set up and maintain.

mikl
Recently I needed rather diverse coverage. From clojure to lua.
Tadeusz A. Kadłubowski
+3  A: 

On the homepage of GeSHi filter module they have done a service for you by listing related modules:

  • Code filter: a simple module with support for PHP syntax highlighting
  • Syntax Highlighter uses a Javascript library to add syntax highlighting client side (unlike GeSHi filter, which renders the highlighted code server side).
  • Chili highlighter also uses a Javascript library to do the syntax highlighting client side.
  • Ajax Markup

I chose syntax highlighter, because it performs formatting on the client side. In addition, it supports wide array of syntaxes: ActionScript3, Bash/shell, C#, C++, CSS, Delphi, Diff, Groovy, JavaScript, Java, JavaFX, Perl, PHP, Plain Text, PowerShell, Python, Ruby, Scala, SQL, Visual Basic, XML

Maine
Cool, detailed answer.
Tadeusz A. Kadłubowski