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

fix(theme): add bash style to Markdown comment styles #7049

Merged
merged 2 commits into from
Mar 29, 2022

Conversation

duanwilliam
Copy link
Contributor

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 is md, 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

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 29, 2022
@netlify
Copy link

netlify bot commented Mar 29, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 50c5e26
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/624258fb034a070008712f91
😎 Deploy Preview https://deploy-preview-7049--docusaurus-2.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 settings.

@github-actions
Copy link

github-actions bot commented Mar 29, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 61
🟢 Accessibility 100
🟢 Best practices 92
🟢 SEO 100
🟢 PWA 90

Lighthouse ran on https://deploy-preview-7049--docusaurus-2.netlify.app/

@Josh-Cena
Copy link
Collaborator

Could you simply add # to the comment styles? I forgot we have this use-case in #7033

@duanwilliam
Copy link
Contributor Author

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.

@duanwilliam duanwilliam reopened this Mar 29, 2022
@duanwilliam
Copy link
Contributor Author

o sorry only just saw this but as said above, not very available right now - you could just do it.

@Josh-Cena Josh-Cena added pr: maintenance This PR does not produce any behavior differences to end users when upgrading. and removed pr: maintenance This PR does not produce any behavior differences to end users when upgrading. labels Mar 29, 2022
@Josh-Cena Josh-Cena changed the title docs: fix code block line highlighting in md syntax highlighting fix(theme): add bash style to Markdown comment styles Mar 29, 2022
Copy link
Collaborator

@Josh-Cena Josh-Cena left a 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!

@Josh-Cena Josh-Cena merged commit b5fc9a6 into facebook:main Mar 29, 2022
@Josh-Cena Josh-Cena added the pr: internal This PR does not touch production code, or is not meaningful enough to be in the changelog. label May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: internal This PR does not touch production code, or is not meaningful enough to be in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants