News for hackers. Stuff that matters.
Re:Highlight.js – Syntax highlighting for the Web by coolmitch on Friday February 20, 2015 @03:30PM (#9082811)
Used this in a project[0] a little while ago and found it really easy to work with. The syntax detection was an added bonus that I had expected to need another library for.

http://cmdv.io

edit: I should mention that this might be a cool example for someone looking to use hljs in React/Flux-- I tried to make it fairly clean. There's a github link on the bottom-left of the website.

Re:Highlight.js – Syntax highlighting for the Web by mmebane on Friday February 20, 2015 @06:54PM (#9083903)
Out of curiosity, are there any decent libraries you looked at for doing language detection? Thhat's the main reason I'm using Highlight.js in one of my projects instead of Prism or Rainbow.

Unfortunately, the tradeoff is no support for generating a display with line numbers. In my case, that was the lesser of two evils, but I wouldn't mind using two libraries if it meant I could get everything I want.

Re:Highlight.js – Syntax highlighting for the Web by coolmitch on Friday February 20, 2015 @07:33PM (#9084059)
Just reading out of my notes, the only non-highlighting detector I was looking at was https://github.com/blakeembrey/node-language-detect, but it's not widely used or developed as far as i can tell.

If you have Ruby in your stack, it's easy -- use github's own https://github.com/github/linguist

You might also be able to use just the language definition files from https://github.com/syntaxhighlighter