Highlight.js Highlights Syntax for 51 Languages with 20 Style Themes
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 library knows 51 languages and is bundled with 20 style themes. The library now works not only in a browser but also with node.js. It is installable with npm install highlight.js.
It also a new unique feature (apparently) among syntax highlighters which is highlighting HTTP headers and an arbitrary language in the request body. The most useful languages here are XML and JSON both of which highlight.js does support.
Demo: http:/ / softwaremaniacs. org/ media/ soft/ highlight/ test. html
License: BSD License
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)