Closed Neohiro79 closed 4 years ago
Javascript depends on the generic language patterns so you have to include that first. As for the style tags, <pre>
blocks will format content exactly as it appears so it is probably a best practice to use spaces vs. tabs and unindent everything you want formatted.
This fork of your fiddle has it all working: https://jsfiddle.net/7kvcguez/
Thank you so much @ccampbell !!!
One more question:
Do I need to include generic.js above any other programming language except for HTML & CSS?
Or is the best way to do it like you described here:
If you want a minimized version with all languages you can pass
gulp build --languages=all
??
Certain languages depend on the generic patterns, but not all.
https://github.com/ccampbell/rainbow/blob/05892a8ebe7689ab3b9ab96cfc77414d8467e749/gulpfile.js#L86
The best bet is using gulp build to create a custom bundle and passing whatever languages you want in a list. You can also use the bundler from the rainbow website, but it is using a slightly out of date version of rainbow (long story) http://rainbowco.de
Thanx for that damn quick reply Craig! You're the best!!
Javscript won't work, weather with
data-language="javascript"
nor withclass="language-javascript"
see this fiddle here:
http://jsfiddle.net/neohiro79/1grwjb50/27/
or am I missing something important here?
Also the
style
tags get some additional tabspace - is there a way to change this?