-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
feat(v2): support comments for code highlighting #2456
feat(v2): support comments for code highlighting #2456
Conversation
Deploy preview for docusaurus-2 ready! Built with commit 49319b2 |
I noticed some potential issues in the Gatsby implementation so I approached it a bit differently.
As I mentioned over in the issue, I've only added
|
OH THIS IS SO COOOOOOOL! :) I'm hyped. Can't wait to use this! |
docs(v2): demonstrate highlighting with comments
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.
This is amazing. I can't wait to change all the code blocks to use this!
Motivation
Per #2271, this adds the ability to highlight lines using
highlight-next-line
,highlight-start
, andhighlight-end
comments.Supported comment syntax:
{ /* comment */ }
//comment
/* comment */
# comment
<!-- comment -->
AFAIK most languages use at least one of these for comments.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
To test, use this markdown:
https://gist.github.com/elviswolcott/c4f15c6b0ec579e43a775cfdf9b25cc4
Related PRs
#2457 (docs)