-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
docs: recommend highlighting with comments than number range #6204
Conversation
if (!fencedBlock) { | ||
fencedBlock = true; | ||
[lastCodeFence] = line.trim().match(/^`+/)!; | ||
// If we are in a ````-fenced block, all ``` would be plain text instead of fences | ||
} else if (line.trim().match(/^`+/)![0].length >= lastCodeFence.length) { | ||
fencedBlock = false; | ||
} |
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.
A quick fix because now we have a ````
fenced block with an odd number of ```
fences inside it. Another reason why we want to ultimately do it through a remark parser!
✔️ [V2] 🔨 Explore the source changes: c248b82 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61ca79c13518ee0008c4a8c3 😎 Browse the preview: https://deploy-preview-6204--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6204--docusaurus-2.netlify.app/ |
Size Change: 0 B Total Size: 662 kB ℹ️ View Unchanged
|
agree 👍 thanks |
Motivation
There are also some hidden motivations:
MDXComponentProvider
is not wired (Feed generation warns: "Receivedtrue
for a non-boolean attribute" when using {2,3} highlighting #6195). Well, highlighting comments don't work either, but they don't emit warnings.I didn't change our own usage for dogfooding purposes. In the future, if we are to update those code blocks, we'll also convert them to highlighting with comments.
Have you read the Contributing Guidelines on pull requests?
Yes