-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Clarify escapes in link reference definitions #600
Comments
Just an aside: the link destination may be “bracketed”, of course, i. e. include a |
@Crissov Definitely, but I didn’t mention it because parsing of bracketed (as in, angle brackets) around a link destination doesn‘t include escapes, according to the spec as it currently is. |
Maybe the subsection on "backslash escapes" should simply be moved out of the Inlines section, and into Preliminaries. It makes many references to both block and inline contexts, so it's not meant to apply only to inlines. (I can see how you'd be led to think that, though.) The section on backslash escapes tries to list all of the contexts where backslash escapes don't work. If there are omissions, please let us know. |
Yeah that can work! I think the contextual problem arises from the block syntax linking to the inline syntax for its definitions, which includes backslash escapes. This would solve that. Come to think of it, a related issue may be that character references can also be used to “escape” syntax, in this particular case |
Link reference definitions consist (sometimes optionally) of link labels, unbracketed link destinations, and single, double, or bracketed (parens) link titles.
These segments can include escaped characters (specifically
]
,(
,)
,'
, and"
).However, for the definition of these segments, link reference definitions reference links, which are inline.
The problem here is that inline constructs have a concept of escapes, whereas block constructs don’t.
Link reference definitions are the only block construct that mention escapes.
The problem here is that it’s a bit ambiguous what “escape” is in block constructs? As there are apparently escapes in blocks, are they backslash escapes? Are “hard line breaks” includes in definitions? Is
x\\]
fine, because it is a backslash and a right square bracket? 🤷♂️N.B. I think I get what the spec is going for, to parse backslash escapes (as in, ascii punctuation) but not hard line breaks, however, I think it may be good to clarify the spec text.
The text was updated successfully, but these errors were encountered: