Live data from Hacker News

Highlight.js – Syntax highlighting for the Web

highlightjs.org

1–10 of 72 posts

Re: Highlight.js – Syntax highlighting for the Web

#5

I 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);

yea! thx!

Re: Highlight.js – Syntax highlighting for the Web

#8
This 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

#9

I 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);

You sir are brilliant!
Post reply on HN