Skip to content

[fuzz result] wrong parse when block ends in a backslash #774

@notriddle

Description

@notriddle

Consider this markdown

# foo \
bar \

Here's what it looks like in GitHub:

foo \

bar \

But pulldown-cmark silently eats the backslashes at the ends of these lines.

Details

Events from pulldown-cmark:

"# \\\n^\n" -> [
  Start(Heading { level: H1, id: None, classes: [], attrs: [] })
  End(Heading(H1))
  Start(Paragraph)
    Text(Borrowed("^"))
  End(Paragraph)
]

Events from pandoc:

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

Events from commonmark.js:

"# \\\n^\n" -> [
  Start(Heading { level: H1, id: None, classes: [], attrs: [] })
    Text(Boxed("\\"))
  End(Heading(H1))
  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