Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight types such as <type> in Python code blocks #38

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jared-hughes
Copy link
Contributor

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

@gto76
Copy link
Owner

gto76 commented Jul 15, 2019

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

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 infrequent
though.
@jared-hughes
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants