-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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: make tutorial code block directly copyable #6833
Conversation
Sample code block could not be copy/pasted as the tutorial mentions with the lines that appear to be from a diff tool.
✔️ [V2] 🔨 Explore the source changes: 46a0009 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/62215df636b00c000725dec7 😎 Browse the preview: https://deploy-preview-6833--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6833--docusaurus-2.netlify.app/ |
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.
I'm okay to change this to make the tutorial less confusing, but please do note that:
with the lines that appear to be from a diff tool.
The diff
code block is a common technique for documentation to show a "user change". It's not the verbatim output from any tool. For example, here it's telling you to delete the existing items
, and add items: ['hello'],
. You will see this used in other places as well.
oh! ill admit i don't think I have ever seen that syntax before but it makes a ton of sense. Thanks for taking the time to explain! |
oh well yea I see it in diff tools all the time! I meant more that I had not seen it in a sample code block like that 😄 |
Motivation
Sample code block could not be copy/pasted as the tutorial mentions with the lines that appear to be from a diff tool.
Have you read the Contributing Guidelines on pull requests?
Yes! this is so small, wasn't sure if it should be an issue or a PR
Test Plan
None
Related PRs
None that I could find