Highlight.js highlights syntax in code examples on blogs, forums and in fact on any web pages. It's very easy to use because it works automatically: finds blocks of code, detects a language, highlights it.
This is not only convenient but also allows highlighting for code examples marked up with writing syntaxes like Markdown where there is no way to specify HTML class easily.
The program knows following languages:
- 1C
- AVR Assembler
- Apache
- Axapta
- Bash
- C#
- C++
- CSS
- DOS .bat
- Delphi
- Django
- HTML, XML
- Ini
- Java
- Javascript
- Lisp
- MEL (Maya Embedded Language)
- Parser3
- PHP
- Perl
- Python
- Python profile
- RenderMan (RIB, RSL)
- Ruby
- Scala
- SQL
- Smalltalk
- VBScript
- diff
version 5.8
News
-
22.11.2009
Version 5.8
- Jan Berkel has contributed a definition for Scala. +1 to hotness!
- All CSS-styles are rewritten to work only inside
<pre>tags to avoid conflicts with host site styles.
-
29.10.2009
Version 5.7. Fixed escaping of quotes in VBScript strings.
-
01.09.2009
Version 5.5 brings a little change: now .ini-files allow digits, underscores and square brackets in key names.
-
26.08.2009
Version 5.4
Fixed small but upsetting bug in the packer which caused incorrect highlighting of explicitly specified languages. Thanks to Andrew Fedorov for precise diagnostics!
-
24.08.2009
Version 5.3
The version to fulfil old promises.
The most significant change is that highlight.js now preserves custom user markup in code along with its own highlighting markup. This means that now it's possible to use, say, links in code. Thanks to Vladimir Dolzhenko for the initial proposal and for making a proof-of-concept patch.
Also in this version:
- Vasily Polovnyov has sent a GitHub-like style and has implemented support for CSS @-rules and Ruby symbols.
- Yura Zaripov has sent two styles: Brown Paper and School Book.
- Oleg Volchkov has sent a definition for Parser 3.