Highlight.js – Syntax highlighting for the Web
highlightjs.org
Highlight.js – Syntax highlighting for the Web
1–10 of 72 posts
Re: Highlight.js – Syntax highlighting for the Web
#2I like it, however, it is possible to make a "click all" checkbox for the "other" languages. You now, I mean: "click, click, click, click ..." ;)
Re: Highlight.js – Syntax highlighting for the Web
#3I like it, however, it is possible to make a "click all" checkbox for the "other" languages. You now, I mean: "click, click, click, click ..." ;)
Paste in console: $('input[type=checkbox]').prop('checked', true);
Re: Highlight.js – Syntax highlighting for the Web
#4How does this compare with Prettify?
Re: Highlight.js – Syntax highlighting for the Web
#5Re: Highlight.js – Syntax highlighting for the Web
#6[deleted]
Re: Highlight.js – Syntax highlighting for the Web
#7What about Prism.js?
Re: Highlight.js – Syntax highlighting for the Web
#8This is my favorite syntax highlighting JS library, by far.
The approach this library takes to building the highlighted DOM tree is very clever. It represents the original DOM and the highlighted code output as separate streams of tag open / close events and then merges them together. This allows the highlighter to maintain the pre-existing DOM structure of the highlighted code! The language auto-detection and sub-language handling are also very neat.
If you like interesting codebases, I'd recommend giving it a quick read. :)
Re: Highlight.js – Syntax highlighting for the Web
#9Re: Highlight.js – Syntax highlighting for the Web
#10It should be mentioned that this does not support and will indeed never support line numbers due to some strange opinions of the lead developer:
http://highlightjs.readthedocs.org/en/latest/line-numbers.ht...