Re:PrismJS
by graue on Tuesday July 31, 2012 @03:30PM
(#4319183)
I'm confused. In the features list: "Prism forces you to use the correct element for marking up code: <code>."
But the site's index.html is using only a pre tag:
<p>The Prism source, highlighted with Prism (don’t you just love how meta this is?):</p>
<pre data-src="prism.js"></pre>
It looks like the script is automatically expanding this, inserting <code> tags along with the named file, but I don't see any documentation for doing it this way.
But the site's index.html is using only a pre tag:
It looks like the script is automatically expanding this, inserting <code> tags along with the named file, but I don't see any documentation for doing it this way.Also, if anyone is as confused as I was about why there's a "data-src" attribute, apparently it's an HTML5 data attribute: http://ejohn.org/blog/html-5-data-attributes/