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
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.