-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc,http,http2: add http highlight grammar #33785
doc,http,http2: add http highlight grammar #33785
Conversation
CI failure is unrelated to these changes. /cc @nschonni |
Fix for CI failure: #33789 |
@@ -7,6 +7,7 @@ | |||
color: #333; | |||
} | |||
|
|||
.hljs-attribute, |
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.
Is this going to have any unintended affect on the other existing code blocks?
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.
Nope, these are the only two instances I was able to find. Something that does not yet have highlighting is the .hljs-attr
class, which probably needs to happen at some point, but this is not the same as that.
Since we removed the newline escapes, it might be necessary to add a small explanation as Mozilla has done in the following page section.
/cc @Trott |
Emulating MDN on this is a good idea IMO. |
Does anyone from @nodejs/http or @nodejs/http2 want to comment on this? I really don't know whether or not that small explanation is applicable to both documents or even a correct suggestion. It may be possible that MDN is wrong too. Should there be a terminating CRLF? Should both of these examples be run with having them? I found some good information here too. I'm a bit concerned about what's stated in https://tools.ietf.org/html/rfc7230#section-3.5 and don't really understand the meaning. I would consider this PR stalled until someone can say for certain. If the |
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 think adding an explanation on \r\n
is necessary. Otherwise this looks good.
@mcollina, sorry for the delay on this, I kind of forgot about it. Would you mind re-reviewing it, please? I've added a reminder to re-add the CRLFs. Adding further explanation might be beyond the scope of this PR. Please let me know what you think! |
Prior to this commit, http request message code blocks in Markdown files were not being highlighted correctly. This has been corrected by adding the new grammar to the bundle, removing the CRLFs (`\r\n`) from these code samples, adding a reminder to re-add them, and tuning the syntax theme to support attribute highlighting.
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.
lgtm
Can someone please add |
Landed in 1dc837e |
Prior to this commit, http request message code blocks in Markdown files were not being highlighted correctly. This has been corrected by adding the new grammar to the bundle, removing the CRLFs (`\r\n`) from these code samples, adding a reminder to re-add them, and tuning the syntax theme to support attribute highlighting. PR-URL: #33785 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Prior to this commit, http request message code blocks in Markdown files were not being highlighted correctly. This has been corrected by adding the new grammar to the bundle, removing the CRLFs (`\r\n`) from these code samples, adding a reminder to re-add them, and tuning the syntax theme to support attribute highlighting. PR-URL: #33785 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Prior to this commit, http request message code blocks in Markdown files were not being highlighted correctly. This has been corrected by adding the new grammar to the bundle, removing the CRLFs (`\r\n`) from these code samples, adding a reminder to re-add them, and tuning the syntax theme to support attribute highlighting. PR-URL: #33785 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Prior to this commit, http request message code blocks in Markdown files were not being highlighted correctly. This has been corrected by adding the new grammar to the bundle, removing the CRLFs (`\r\n`) from these code samples, adding a reminder to re-add them, and tuning the syntax theme to support attribute highlighting. PR-URL: #33785 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Prior to this commit, http request message code blocks in Markdown
files were not being highlighted correctly. This has been corrected by
adding the new grammar to the bundle, removing the CRLFs (
\r\n
) fromthese code samples, adding a reminder to re-add them, and tuning the
syntax theme to support attribute highlighting.
Checklist
/cc @Trott