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

Add syntax highlighting to code samples #158

Merged
merged 2 commits into from
Sep 20, 2021

Conversation

beaufortfrancois
Copy link
Member

This PR adds some code syntax highlighting to code samples with the help of the "highlight.js" package. It makes code samples more readable.

image
Before

image
After

Fixes #143

@derekherman derekherman requested a review from dero September 15, 2021 06:37
Copy link
Collaborator

@dero dero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beaufortfrancois This is a great addition, but we need to make sure code highlighting uses a different palette when dark mode is on. (Either by toggling it in app settings or in the OS.)

image

Adding the highlight colors to the two existing blocks of CSS color variables should do the trick.

@derekherman derekherman added the enhancement New feature or request label Sep 16, 2021
@beaufortfrancois
Copy link
Member Author

Oops! I've completely missed dark mode colors. Thanks for catching!
See my latest commit.

Copy link
Collaborator

@dero dero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great now, thanks @beaufortfrancois!

image

@derekherman derekherman merged commit 03a2040 into GoogleChrome:develop Sep 20, 2021
@felipebochehin87
Copy link

LGTM.

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

Successfully merging this pull request may close these issues.

Add code highlighting
4 participants