-
Notifications
You must be signed in to change notification settings - Fork 300
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
LinkReferenceDefinition takes over sourceSpans from a block following it #315
Comments
An input like this: ``` [foo]: /url "title" bad ``` Means the second line is just a paragraph because only spaces/tabs are allowed after a title. The parser used to set the title to "title" in this case and assign the source span of the second line to the definition, which is wrong. Fixes #315.
Thanks! Raised a PR to fix this.
Link reference definitions are a bit of an odd one in the way they're parsed. But in the spec, they're listed under blocks: https://spec.commonmark.org/0.31.2/#link-reference-definitions We should probably change them to |
Done in 3038d47 |
Steps to reproduce the problem (provide example Markdown if applicable):
Run this example with
IncludeSourceSpans.BLOCKS
https://spec.commonmark.org/0.31.2/#example-210Expected behavior:
It should assign source spans to blocks
Actual behavior:
It only assigns source spans to a
LinkReferenceDefinition
which is not a blockPS [unrelated] a top level
Document
should probably only containBlock
s whileLinkReferenceDefinition
is aNode
The text was updated successfully, but these errors were encountered: