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

Support for line highlighting in code blocks #206

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

stefano-ottolenghi
Copy link
Contributor

@stefano-ottolenghi stefano-ottolenghi commented Dec 18, 2023

(Color comes from Needle, but cannot use the css color vars directly because they embed an opacity of 1, which we want to be 0.5)

Copy link

netlify bot commented Dec 18, 2023

Deploy Preview for neo4j-docs-ui ready!

Name Link
🔨 Latest commit e5b514e
🔍 Latest deploy log https://app.netlify.com/sites/neo4j-docs-ui/deploys/65801b6180450800083ddd61
😎 Deploy Preview https://deploy-preview-206--neo4j-docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@recrwplay
Copy link
Collaborator

We'll need to make sure that with the highlight colors used for text in codeblocks, the background color choice passes WCAG AA (and ideally AAA).

This PR doesn't materially affect A11y status though, since we need to update the text highlight colors anyway.

If we want to merge this we should note that the colors will need to change later.

@stefano-ottolenghi
Copy link
Contributor Author

Thanks for raising this. If colors will need to change anyway, let's merge this and keep it in mind for the future.

@stefano-ottolenghi stefano-ottolenghi merged commit 203d182 into master Dec 22, 2023
5 checks passed
@stefano-ottolenghi stefano-ottolenghi deleted the line-highlight branch January 8, 2024 06:46
@stefano-ottolenghi
Copy link
Contributor Author

There seems to be a glitch where sometimes the // mark-line is not parsed and is displayed as-is. I suspect a bug in highlight.js, possibly this one highlightjs/highlight.js@970a4d3 , which is unfortunately only fixed in v11.

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