SHJS - Syntax Highlighting in JavaScript

SHJS is a JavaScript program which highlights source code passages in HTML documents. Documents using SHJS are highlighted on the client side by the web browser.

SHJS uses language definitions from GNU Source-highlight. This gives SHJS the ability to highlight source code written in many different languages:

Bison
C
C++
C#
ChangeLog
CSS
Desktop files
Diff
Flex
GLSL
Haxe
HTML
Java
Java properties files
JavaScript
JavaScript with DOM
LaTeX
LDAP files
Log files
LSM (Linux Software Map) files
M4
Makefile
Objective Caml
Oracle SQL
Pascal
Perl
PHP
Prolog
Python
RPM spec files
Ruby
S-Lang
Scala
Shell
SQL
Standard ML
Tcl
XML
Xorg configuration files

SHJS comes with themes taken from the Highlight program.

SHJS is distributed under the GNU General Public License version 3.

#include <iostream>

using namespace std;

int main(int argc, char ** argv) {
  cout << "Hello world" << endl;
  return 0;
}
Loading...
C++ code highlighted using the nedit theme
Copyright © 2007, 2008 gnombat@users.sourceforge.net GPL Logo SourceForge.net Logo