Highlight.js Highlights Syntax for 51 Languages with 20 Style Themes
Join the DZone community and get the full member experience.Join For Free
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.
requirements : none
demo : http:/ / softwaremaniacs. org/ media/ soft/ highlight/ test. html
license : bsd license
Published at DZone with permission of Hirvesh Munogee, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.