Thanks!
Rainbow.js - code syntax highlighting in 1.2kb
21–30 of 34 posts
Re: Rainbow.js - code syntax highlighting in 1.2kb
#22Why do people make pages highlighting colorizing things, and then make the subtitle of the page (and other text) be blue on black? This does not inspire confidence.
Purple and orange and green and white on dark blue. My eyes hurt reading this. Pick a couple of colors with relatively high contrast, and make sure the text isn't lighter than the background.
Re: Rainbow.js - code syntax highlighting in 1.2kb
#23I would love to see a javascript highliter that consumes TextMate syntax definitions.
1. TM syntaxes are complicated. There's lots of undocumented features that bundles find ways to use in crucial places.
2. TM is slow. You don't see this so much because it's written in C++ and there's many clever optimizations (see point 1). But it's difficult to get around the fact that a syntax is hundreds of regexes that have to be run over the whole document in a pathologically slow manner. I hate to think what it would be like in JS.
3. Many TM language definitions are dependent on features of the Oniguruma regex engine, which is strictly more powerful than any JS one. So you basically have to compile Oniguruma (no mean feat) ...with emscripten.
Re: Rainbow.js - code syntax highlighting in 1.2kb
#24So... why should I use this instead of http://softwaremaniacs.org/soft/highlight/en/ ?
Re: Rainbow.js - code syntax highlighting in 1.2kb
#25So... why should I use this instead of http://softwaremaniacs.org/soft/highlight/en/ ?
Re: Rainbow.js - code syntax highlighting in 1.2kb
#26I would love to see a javascript highliter that consumes TextMate syntax definitions.
The problems I see are: 1. TM syntaxes are complicated . There's lots of undocumented features that bundles find ways to use in crucial places. 2. TM is slow. You don't see this so much because it's written in C++ and there's many clever optimizations (see point 1). But it's difficult to get around the fact that a syntax is hundreds of regexes that have to be run over the whole document in a pathologically slow manne…
Re: Rainbow.js - code syntax highlighting in 1.2kb
#27So... why should I use this instead of http://softwaremaniacs.org/soft/highlight/en/ ?
You shouldn't. There are just too many errors in highlighting.
Re: Rainbow.js - code syntax highlighting in 1.2kb
#28So... why should I use this instead of http://softwaremaniacs.org/soft/highlight/en/ ?
You shouldn't. There are just too many errors in highlighting.
Re: Rainbow.js - code syntax highlighting in 1.2kb
#29Earlier quoted context omitted.
You shouldn't. There are just too many errors in highlighting.
This thing was written in ~2 weeks, so there's no way it can compete with a project that's 2 years old! It can either stagnate or evolve, but I think that the way the code is laid out will encourage a lot of collaboration. Personally, I love and use Highlight, but (I confess, as a textmate ho) I'd like to see rainbow improve. Competition is always good. Maybe you guys can/should help each other?
Re: Rainbow.js - code syntax highlighting in 1.2kb
#30Earlier quoted context omitted.
This thing was written in ~2 weeks, so there's no way it can compete with a project that's 2 years old! It can either stagnate or evolve, but I think that the way the code is laid out will encourage a lot of collaboration. Personally, I love and use Highlight, but (I confess, as a textmate ho) I'd like to see rainbow improve. Competition is always good. Maybe you guys can/should help each other?
Correction: highlight.js is 6 years old :-). And yes, I'm going to look into Rainbow more properly for useful ideas. And I encourage Craig to do the same. Isn't Open Source awesome? :-)