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
- Diff
- DOS .bat
- Delphi
- Django
- HTML, XML
- Ini
- Java
- Javascript
- Lisp
- Lua
- MEL (Maya Embedded Language)
- Nginx
- Parser3
- PHP
- Perl
- Python
- Python profile
- RenderMan (RIB, RSL)
- Ruby
- Scala
- SQL
- Smalltalk
- TeX
- VBScript
version 5.11
News
-
24.06.2010
Version 5.10 -- "Paris".
Though I'm on a vacation in Paris, I decided to release a new version with a couple of small fixes:
- Tomas Vitvar discovered that TAB replacement doesn't always work when used with custom markup in code
- SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
-
17.06.2010
Version 5.9
A long-awaited version is finally released.
New languages:
- Andrew Fedorov made a definition for Lua
- a long-time highlight.js contributor Peter Leonov made a definition for Nginx config
- Vladimir Moskva made a definition for TeX
Fixes for existing languages:
- Loren Segal reworked the Ruby definition and added highlighting for YARD inline documentation
- teh definition of SQL has become more solid and now it shouldn't be overly greedy when it comes to language detection
The highlighter has become more usable as a library allowing to do highlighting from initialization code of JS frameworks and in ajax methods (see. readme.eng.txt).
Also this version drops support for the WordPress plugin. Everyone is welcome to pick up its maintenance if needed.
-
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.