Live data from Hacker News

Highlight.js – Syntax highlighting for the Web

highlightjs.org

31–40 of 72 posts

Re: Highlight.js – Syntax highlighting for the Web

#31
post #25
post #10

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

http://prismjs.com/ is an alternative that supports line numbers.

I already like this one better, to be honest. It also already has Julia and Rust support. If it were to include Elixir support as well, it'd be perfect.

Re: Highlight.js – Syntax highlighting for the Web

#36
post #16

Earlier quoted context omitted.

"So if you look at line 7, you'll see..."

... that the presenter should buy a laser pointer!

Laser pointers don't work if the video is being recorded or screencast at the same time. They only work when the viewer is in the same room, and even then, they are typically pretty poor.

Re: Highlight.js – Syntax highlighting for the Web

#37
post #10

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

I think this comment/discussion ends up over-emphasizing the 'strangeness' of the line-number situation with this library, the page linked ends with: 'This position is subject to discuss. Also it doesn’t stop anyone from forking the code and maintaining line-numbers implementation separately.', which seems pretty reasonable to me!

Re: Highlight.js – Syntax highlighting for the Web

#38
post #10

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

I understand the author's point-of-view on this, but disabling line numbers sounds like something that should be user-controllable. Right now it feels like a misfeature, whereas "we don't implement line numbers by default, but if you want them, do this and that and you can have them" would feel way more like a good feature to have.

Has anyone actually tried submitting a patch that implements it yet?

https://groups.google.com/d/msg/highlightjs/UVJaQcQNC1c/1C6U...

Re: Highlight.js – Syntax highlighting for the Web

#39
post #16

Earlier quoted context omitted.

"So if you look at line 7, you'll see..."

... that the presenter should buy a laser pointer!

This also applies to comments within the presentation, not just the verbal part of the presentation.

Re: Highlight.js – Syntax highlighting for the Web

#40
post #25
post #10

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

http://prismjs.com/ is an alternative that supports line numbers.

And in particular prismjs lets you select lines of code without selecting the line numbers, which you probably do not want.
Post reply on HN