@bramus @hi_mayank @Meyerweb I think a next step towards a declarative API—one that doesn’t require JS—would be some way of teaching the browser grammars using something like PEG. Then you could set an attribute on a `<code>` element to specify which grammar you want to be used for it to auto-tokenize and highlight that code block.
@knowler @hi_mayank @Meyerweb I don’t think that would work.
Which languages do you include? Which versions of those languages? When do these definition files get updated? Would you be able to load your own? …
Reminds me of authors requesting to put jQuery in the browser. Same questions arose.
(We actually got that last thing … not by including jQuery in browsers but by having better JavaScript/DOM APIs nowadays)