Skip to content

Conversation

@bram-pkg
Copy link
Member

@bram-pkg bram-pkg commented Nov 19, 2020

Highlight.js has better highlighting for language constructs. This will highlight $faker in a different color, and operators, functions too.

Documentation for this can be found here:

Because we are using the navigation.instant feature (this loads a new page using XHR instead of a reload), the code blocks in a page wouldn't initialize after navigation. I added a small workaround for this using the DOMContentSwitch event.

Before: https://s3.bram.cloud/sharex-bram/chrome_iZ4C4AwoWn.png
After: https://s3.bram.cloud/sharex-bram/chrome_rZ0d7i2ldR.png

@bram-pkg bram-pkg requested review from Nyholm and pimjansen November 19, 2020 11:13
@bram-pkg bram-pkg removed the request for review from Nyholm November 19, 2020 16:10
@pimjansen pimjansen merged commit 8ed94da into main Nov 19, 2020
@pimjansen pimjansen deleted the better-highlighting branch November 19, 2020 16:56
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.

2 participants