-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
fix(theme): add bash style to Markdown comment styles #7049
Conversation
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-7049--docusaurus-2.netlify.app/ |
Could you simply add |
ah not as simple as expected, different behavior between docusaurus and a sandbox starter with regards to line highlighting and syntax highlighting with markdown and markdown frontmatter. will open issue / look more into it later when available. |
o sorry only just saw this but as said above, not very available right now - you could just do it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for noticing!
Motivation
Currently the code block in https://docusaurus.io/docs/sidebar/autogenerated#autogenerated-sidebar-metadata uses the wrong comment delimiter (
#
) for code highlighting - while it is highlighting YAML frontmatter, the code block language ismd
, which is used to determine the valid comment delimiters for highlighting (https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts). This changes those comments to use//
instead.Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
edit and check the website