Skip to content
Advertisement

Tag: syntax-highlighting

What JavaScript syntax highlighter does GitHub use?

What syntax highlighter is GitHub using on their site to display the code when you click on the file names? Answer As this help page of GitHub.com says, they’re using the Linguist library, which is written in Ruby. Linguist’s highlighters for each language are within vendor/grammars. And a list of supported languages can be found here, here, and here.

CodeMirror 2 – Highlight only (no editor)

Can CodeMirror 2 be used to highlight code from a DIV or PRE tag (without the editor)? Like CodeMirror 1 used to be able to do with the hightlightText() function? For example here: http://codemirror.net/1/highlight.html, after you press run highlight (the highlighted text below) Also can it highlight code from a inline element, like <code>, and keep the results inline, like

Advertisement