GeSHi Filter for syntax highlighting

GeSHi filter

The GeShi Filter module provides a filter for source code syntax highlighting for a wide range of languages.

Source code can be entered with for example <code type="java">...</code> or <blockcode language="python">...</blockcode>. Starting from version 5.x-2.0 it is also possible to define your own generic and language specific tags (e.g. <java>) or to work with square bracket style tags (e.g. [code]). Automatically adding line numbers is possible too.

This module requires the third-party PHP library GeSHi (Generic Syntax Highlighter) (1.0.x branch). At the time of this writing this library supports highlighting for the following languages: ABAP, ActionScript, Ada, Apache Log, AppleScript, ASM, ASP, AutoIt, Bash, BlitzBasic, bnf, C, C (Mac), CAD DCL, CAD Lisp, CFDG, ColdFusion, C++, C++ (QT), C#, CSS, D, Delphi, Diff, DIV, DOS, dot, Eiffel, Fortran, FreeBasic, genero, GML, Groovy, Haskell, HTML, Uno Idl, INI, Inno, Io, Java, Java(TM) 2 Platform Standard Edition 5.0, Javascript, LaTeX, Lisp, Lua, Motorola 68000 Assembler, Matlab M, mIRC Scripting, Microchip Assembler, MySQL, NSIS, Objective C, OCaml, OpenOffice.org Basic, Oracle 8 SQL, Pascal, per, Perl, PHP, PL/SQL, Python, QBasic/QuickBASIC, Rails, Microsoft Registry, robots.txt, Ruby, SAS, Scheme, sdlBasic, Smalltalk, Smarty, SQL, TCL, Text, thinBasic, T-SQL, Visual Basic, vb.net, VHDL, Visual Fox Pro, Winbatch, XML, X++, ZiLOG Z80 Assembler. Additional support for highlighting Drupal source code is provided too.

Versions

The 4.7.x-1.x branch is based on the original GeSHi filter module by Vincent Filby. The 5.x-1.x branch is a basic port of this version for Drupal 5.

In the 5.x-2.x branch the GeSHi filter got a major overhaul. Main features/changes: configurable code block tags, per language tags (e.g. <java>), a submodule for a GeSHi source code node type, easier administration UI, guided filter conflict solving, and many bug fixes.

Notice: Drupal 5.6 breaks GeSHi filter 5.x-2.3 and earlier. Version 5.x-2.4 or higher is required when using Drupal 5.6 or higher.

Releases

Official releasesDateSizeLinksStatus
6.x-1.12008-Jun-0867.13 KBRecommended for 6.xThis is currently the recommended release for 6.x.
5.x-2.82008-Jun-0261.35 KBRecommended for 5.xThis is currently the recommended release for 5.x.
Development snapshotsDateSizeLinksStatus
5.x-2.x-dev2008-Jun-0361.35 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.
 
 

Drupal is a registered trademark of Dries Buytaert.