by coolmitch · 11y ago · 0 comments
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.
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.
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