python-cheatsheet icon indicating copy to clipboard operation
python-cheatsheet copied to clipboard

Highlight types such as <type> in Python code blocks

Open jared-hughes opened this issue 4 years ago • 2 comments

Simply runs a regex replacement after highlight.js does the rest of the highlighting. As a consequence, it does not highlight strings such as <class> which contain a Python keyword. This is relatively infrequent though.

Screenshot of changes

jared-hughes avatar Jul 15 '19 00:07 jared-hughes

Interesting, but adding another color is a bit much for my taste.

gto76 avatar Jul 15 '19 19:07 gto76

Same for my taste. This simple bolding looks much better.

Also importantly, it preserves color within strings, which the green highlighting did not

Screenshot from 2019-07-15 20-25-09

jared-hughes avatar Jul 16 '19 03:07 jared-hughes