Is there prior art to either
(Simple?) Add a new cell type to Jupyter notebook and apply custom syntax highlighting to all string literals in cells of that type while otherwise treating these cells exactly like regular Python cells. I'd be fine to do the parsing myself, but I'm not sure how one would split the highlighting work between Jupyter and my custom highlighter. I'd be happy to dig around the Jupyter source code to make this work, i.e., I'd accept this not having the form of a regular Jupyter extension in the end.
(Hard?) Apply custom syntax highlighting to all strings with a
sprefix (e.g.s'myString') and before executing the cell remove theswhile keeping any additional valid python string prefixes likeforuorr)
?
If not, could someone sketch the steps required to make this work? I don't know much JS so I'd prefer Python solutions, but I'm happy to learn the required JS if needed.