clarify that character references are not interpreted in HTML blocks and raw HTML#690
Open
rsc wants to merge 1 commit intocommonmark:masterfrom
Open
clarify that character references are not interpreted in HTML blocks and raw HTML#690rsc wants to merge 1 commit intocommonmark:masterfrom
rsc wants to merge 1 commit intocommonmark:masterfrom
Conversation
…and raw HTML The wording in section 2.5 implied otherwise, although an example in 6.6 did clarify. Adjust the first to remove the false implication and adjust the second from saying "preserved", which might mean they have to be parsed first, to "copied uninterpreted".
wooorm
reviewed
Sep 7, 2021
Comment on lines
+725
to
+726
| Entity and numeric character references are treated as literal | ||
| text in code spans and code blocks: |
Contributor
There was a problem hiding this comment.
Suggested change
| Entity and numeric character references are treated as literal | |
| text in code spans and code blocks: | |
| Entity and numeric character references are treated literally | |
| in code spans and code blocks: |
I think “text” might be a bit confusing as there’s the connotation with “Textual content”. Characters in this context, is confusing too. So many like this?
Comment on lines
+744
to
+745
| Entity and numeric character references are left uninterpreted | ||
| in HTML blocks and raw HTML: |
Contributor
There was a problem hiding this comment.
Suggested change
| Entity and numeric character references are left uninterpreted | |
| in HTML blocks and raw HTML: | |
| Entity and numeric character references are not interpreted | |
| in HTML blocks and raw HTML: |
Personally I think this suggestion is clearer, but I don’t have strong opinions on it.
Comment on lines
+757
to
+759
| Entity and numeric character references are recognized in any | ||
| any other context, including URLs, [link titles], and | ||
| [fenced code block][] [info strings]: |
Contributor
There was a problem hiding this comment.
Suggested change
| Entity and numeric character references are recognized in any | |
| any other context, including URLs, [link titles], and | |
| [fenced code block][] [info strings]: | |
| Entity and numeric character references are recognized in any | |
| other context, including URLs, [link titles], and | |
| [fenced code block][] [info strings]: |
Double any.
|
|
||
|
|
||
| Entity and numeric character references are preserved in HTML | ||
| Entity and numeric character references are copied uninterpreted in HTML |
Contributor
There was a problem hiding this comment.
Suggested change
| Entity and numeric character references are copied uninterpreted in HTML | |
| Entity and numeric character references are not interpreted in HTML |
Same as my earlier reasoning.
|
|
||
|
|
||
| Backslash escapes do not work in HTML attributes: | ||
| Backslash escapes are also copied uninterpreted: |
Contributor
There was a problem hiding this comment.
Suggested change
| Backslash escapes are also copied uninterpreted: | |
| Backslash escapes are also not interpreted: |
|
|
||
|
|
||
| Not interpreting backslash escapes can mean not recognizing | ||
| a tag that HTML5 would recognize: |
Contributor
There was a problem hiding this comment.
I’m not a fan of this sentence: HTML(5) definitely does recognise this. It’s a “valid” but weird link to \ and an attribute " (w/o value).
Perhaps better to say something along the lines of:
As backslash escapes are a markdown thing, and not an HTML thing,
they are not interpreted in HTML:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The wording in section 2.5 implied otherwise,
although an example in 6.6 did clarify.
Adjust the first to remove the false implication
and adjust the second from saying "preserved",
which might mean they have to be parsed first,
to "copied uninterpreted".
The diff makes a bit of a hash of the changes,
which are to move the "unrecognized" cases
above the recognized ones, as suggested in #687.
Fixes #687.