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
Diff
Flex
HTML
Java
JavaScript
LaTeX
Log files
M4
Makefile
Pascal
Perl
PHP
Prolog
Python
Ruby
Shell
SQL
Tcl
XML

SHJS comes with themes taken from the Highlight program.

SHJS is distributed under the GNU General Public License.

Copyright © 2007 gnombat@users.sourceforge.net
Last modified August 4, 2007
SourceForge.net Logo
#include <iostream>

using namespace std;

int main(int argc, char ** argv) {
  cout << "Hello world" << endl;
  return 0;
}
C++ code highlighted using the nedit theme