top | item 9082547

(no title)

rlx0x | 11 years ago

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

discuss

order

dingdingdang|11 years ago

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!

ajsharma|11 years ago

Yeah, this is pretty much the behavior that I want to see from open source maintainers: make decisions and build conventions but be open to having your mind convinced of alternatives.

pothibo|11 years ago

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

luddypants|11 years ago

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

thomasfoster96|11 years ago

Prism is pretty damn good. Although the name sounds like an NSA plan to intercept all the javascript libraries in the world.

yellowapple|11 years ago

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.

ericHosick|11 years ago

Line numbers are really helpful when presenting code at an event, in a meeting, etc.

gelatocar|11 years ago

Genuine question, why?

jimmytucson|11 years ago

Is line numbers considered "highlighting"? I mean, I get why you would want it but I never would have thought to ask for it.

awhitty|11 years ago

It does seem more appropriate to have a separate module for line numbers. I would definitely understand the separation of concerns argument, but the maintainer instead makes some sort of emotional appeal about clutter and simplicity to explain why there is no line number support.

yellowapple|11 years ago

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.

aw3c2|11 years ago

It's free software so that's no problem if you feel the need.