2 ms·
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 ta
by graue 14y ago
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.
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/ http://ejohn.org/blog/html-5-data-attributes/