Skip to content

[fuzz results] link definition names are being parsed with higher priority than setext headers #768

@notriddle

Description

@notriddle

Consider this:

[First try
----------
Second try]: https://rust-lang.org

It's a real ambiguity of the CommonMark spec; I could not find anywhere that it said anything about whether link definitions or setext headers have higher binding power. But most other parsers do it the same way:

[First try

Second try]: https://rust-lang.org

Details
"[*\n-\n]:{\n" -> [
]

Events from pandoc:

"[*\n-\n]:{\n" -> [
  Start(Heading { level: H2, id: None, classes: [], attrs: [] })
    Text(Boxed("[*"))
  End(Heading(H2))
  Start(Paragraph)
    Text(Boxed("]:{"))
  End(Paragraph)
]

Events from commonmark.js:

"[*\n-\n]:{\n" -> [
  Start(Heading { level: H2, id: None, classes: [], attrs: [] })
    Text(Boxed("[*"))
  End(Heading(H2))
  Start(Paragraph)
    Text(Boxed("]:{"))
  End(Paragraph)
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions