@hi_mayank @Meyerweb I have prism set up in manual mode, meaning it doesn't automatically kick in.
I then manually call it to tokenize the code. This gives me a bunch of numbers about which token is where and what type it is.
This info is then used to populate the Custom Highlight API.
@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.