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

docs: recommend highlighting with comments than number range #6204

Merged
merged 2 commits into from
Dec 28, 2021

Conversation

Josh-Cena
Copy link
Collaborator

Motivation

There are also some hidden motivations:

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

@Josh-Cena Josh-Cena added the pr: documentation This PR works on the website or other text documents in the repo. label Dec 28, 2021
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 28, 2021
Comment on lines +51 to +57
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;
}
Copy link
Collaborator Author

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!

@netlify
Copy link

netlify bot commented Dec 28, 2021

✔️ [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

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 89
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

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

@Josh-Cena Josh-Cena merged commit 4f2330a into main Dec 28, 2021
@Josh-Cena Josh-Cena deleted the jc/recommend-highlight-comment branch December 28, 2021 02:55
@github-actions
Copy link

Size Change: 0 B

Total Size: 662 kB

ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 40.1 kB
website/build/assets/css/styles.********.css 102 kB
website/build/assets/js/main.********.js 490 kB
website/build/index.html 29.6 kB

compressed-size-action

@slorber
Copy link
Collaborator

slorber commented Dec 28, 2021

agree 👍 thanks

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: documentation This PR works on the website or other text documents in the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants