Navigation
Home News Examples Demo Downloads FAQ Documentation Mailing Lists License
Support GeSHi!
If you're using GeSHi, why not help GeSHi out? You can link to GeSHi with this image:
Powered by GeSHi
Get the HTML

Project Status
The latest stable version of GeSHi is 1.0.8.11, released on the 19th of Aug, 2012.

Supported Languages:
*ABAP
*Actionscript
*ADA
*Apache Log
*AppleScript
*APT sources.list
*ASM (m68k)
*ASM (pic16)
*ASM (x86)
*ASM (z80)
*ASP
*AutoIT
*Backus-Naur form
*Bash
*Basic4GL
*BlitzBasic
*Brainfuck
*C
*C for Macs
*C#
*C++
*C++ (with QT)
*CAD DCL
*CadLisp
*CFDG
*CIL / MSIL
*COBOL
*ColdFusion
*CSS
*D
*Delphi
*Diff File Format
*DIV
*DOS
*DOT language
*Eiffel
*Fortran
*FourJ's Genero
*FreeBasic
*GetText
*glSlang
*GML
*gnuplot
*Groovy
*Haskell
*HQ9+
*HTML
*INI (Config Files)
*Inno
*INTERCAL
*IO
*Java
*Java 5
*Javascript
*KiXtart
*KLone C & C++
*LaTeX
*Lisp
*LOLcode
*LotusScript
*LScript
*Lua
*Make
*mIRC
*MXML
*MySQL
*NSIS
*Objective C
*OCaml
*OpenOffice BASIC
*Oracle 8 & 11 SQL
*Pascal
*Perl
*PHP
*Pixel Bender
*PL/SQL
*POV-Ray
*PowerShell
*Progress (OpenEdge ABL)
*Prolog
*ProvideX
*Python
*Q(uick)BASIC
*robots.txt
*Ruby
*Ruby on Rails
*SAS
*Scala
*Scheme
*Scilab
*SDLBasic
*Smalltalk
*Smarty
*SQL
*T-SQL
*TCL
*thinBasic
*TypoScript
*Uno IDL
*VB.NET
*Verilog
*VHDL
*VIM Script
*Visual BASIC
*Visual Fox Pro
*Visual Prolog
*Whitespace
*Winbatch
*Windows Registry Files
*X++
*XML
*Xorg.conf

GeSHi 1.0.8.11 is the current stable release, with eighteen new languages and bug fixes over the last release.

GeSHi 1.1.2alpha5 is the current latest version from the development branch, with full C support (see the GeSHi development website).
Subscribe
RSS 2
Mailing Lists
HomeNewsExamplesDemoDownloadsFAQDocumentationMailing ListsLicense 
9:48 am GMT

GeSHi - Generic Syntax Highlighter

Welcome to the home of the Generic Syntax Highlighter - GeSHi. GeSHi started as an idea to create a generic syntax highlighter for the phpBB forum system, but has been generalised to this project. GeSHi aims to be a simple but powerful highlighting class, with the following goals:
  • Support for a wide range of popular languages
  • Easy to add a new language for highlighting
  • Highly customisable output formats

GeSHi aims to do this all as quickly as possible. Many customisable features of GeSHi facilitate speed increases, and you can easily find a balance between the amount of highlighting done and the speed in which it is done.

GeSHi supports PHP5 and Windows, and has even been used to highlight code on ASP pages. Numerous blogs, wikis and forums use GeSHi, including Dokuwiki, Mambo, phpBB and WikkaWiki.

GeSHi is an award winning piece of software - so you know you're using a top quality product.
 

Latest News

GeSHi on GitHub
2013/11/16
Since this week GeSHi has migrated to use Git for version control of the source code. Parallel to this move the source code hosting has moved away from SourceForge to GitHub Thus the old code at SourceForge is there only for historical reasons and will no longer be updated.

You can find more details on this change in my blog.

GeSHi Website available encrypted
2012/11/25
I recently decided to make the GeSHi website available via SSL as a related project requires use of SSL anyway. Currently I'm not yet forcing SSL, but if you connected successfully via SSL once you'll use it automatically for the next six months due to HSTS.

The reason I'm currently not enforcing is that as the used Certification Authority CAcert is not in the trusted store of Mozilla and Internet Explorer (although the second is not relevant to me) you'd probably get alot of confusing warnings. Thus as of now you should make a conscious choice to use the encrypted version of this website. If you do and you get an error "Issuer not trusted" please check the Certificate or verify the Root Certificate of CAcert is installed properly.

This change is available for qbnz.com and geshi.org.

GeSHi 1.0.8.11 Released
2012/08/19
Again quite some time has passed but here it is: the new release of GeSHi with loads of new languages, some minor parser tweaks and fixes to existing language files. It adds 18 more languages thus making a total of 219 supported languages.

This release includes two minor bugfixes for the contrib scripts shipped with GeSHi which allowed for Remote File Inclusion and Cross Side Scripting. Thus if you have the contrib scripts installed it is strongly advised to update ASAP. Some more details can be seen in my blog or in the changelog.

As already noted previously there's a problem with PCRE not working properly with some large sources: As I'm not a developer of PCRE, but a mere user I ask you to report issues with PCRE crashes upstream to them, not me.

More information on current GeSHi developement can be found in the GeSHi corner of my blog.

Download from the usual place, bug reports to the sf.net tracker please etc. etc...

BenBE.


GeSHi 1.0.8.10 Released
2011/02/11
After a quite long time of inactivity there is finally a new release of GeSHi with loads of new languages, some minor parser tweaks and fixes to existing language files. It adds 15 more languages thus making a total of 201 supported languages.

This release does introduce some minor changes into the parser improving the way numbers are highlighted and extending support for common number formats. Additionally it fixes many issues with highlighting that people noticed in the various language files. Some more details can be seen in my blog or in the changelog.

Also given a recent attack on the SourceForge.net systems I decided to take action and finally do what I already planned for quite some time: starting with 1.0.8.10 ALL (including old) releases of GeSHi will be signed. For details on how to check the used GnuPG signatures please refer to my blog. It is furthermore highly recommended to check the signatures

As already noted previously there's a problem with PCRE not working properly with some large sources: As I'm not a developer of PCRE, but a mere user I ask you to report issues with PCRE bugs upstream to them, not me.

More information on current GeSHi developement can be found in the GeSHi corner of my blog.

Download from the usual place, bug reports to the sf.net tracker please etc. etc...

BenBE.


GeSHi 1.0.8.9 Released
2010/07/22
Again there have been some changes in this new release. It contains some bugfixes and enhancements over earlier releases and adds 9 more languages thus making a total of 186 supported languages.

This release does introduce some minor changes into the parser improving the way numbers are highlighted and extending support for common number formats. Additionally it fixes many issues with highlighting that people noticed in the language files.

As already noted previously there's a problem with PCRE not working properly with some large sources: As I'm not a developer of PCRE, but a mere user I ask you to report issues with PCRE bugs upstream to them, not me.

More information on current GeSHi developement can be found in my blog.

Download from the usual place, bug reports to the sf.net tracker please etc. etc...

BenBE.

News Archive

Random Screenshot

[small3.png: Click for a larger view]

Demonstration


Language:  

Runtime Example

class Abstract
{
        private var sub:IAbstract;
        // Private constructor disallows instantiation
        private function Abstract()
        {
                // Cast a reference of the extending class instance to the interface type
                // which contains the abstract methods.
                sub = IAbstract(this);
                //Flash Player 7 Only
                if(sub == null) // invalid cast will return null in Flash player 7
                {
                        throw("Classes extending Abstract must implement IAbstract");
                }
                // end Flash Player 7 Only
                /* For Flash Player 6 (or 7) use this runtime type check
                if(!(sub instanceof IAbstract))
                {
                sub = null;
                trace("Classes extending Abstract must implement IAbstract");
        }
                */

                //Because sub is of type IAbstract no compiler error is thrown
                sub.myAbstractMethod();
        }
}