Skip to content

[fuzz result] blank list item affects parsing of parent list #762

@notriddle

Description

@notriddle

Consider these two samples:

 - >*

   -
 - >x

   -

They ought to produce the same thing, except the asterisk becomes a list instead of the plain x, but pulldown-cmark thinks the list item on line 3 of the first sample is a top-level list item, while the analogous one on the second sample is nested.

Details

Events from pulldown-cmark:

" - >*\n\n   -\n" -> [
  Start(List(None))
    Start(Item)
      Start(BlockQuote)
        Start(List(None))
          Start(Item)
          End(Item)
        End(List(false))
      End(BlockQuote)
    End(Item)
    Start(Item)
    End(Item)
  End(List(false))
]

Events from pandoc:

" - >*\n\n   -\n" -> [
  Start(List(None))
    Start(Item)
      Start(BlockQuote)
        Start(List(None))
          Start(Item)
          End(Item)
        End(List(false))
      End(BlockQuote)
      Start(List(None))
        Start(Item)
        End(Item)
      End(List(false))
    End(Item)
  End(List(false))
]

Events from commonmark.js:

" - >*\n\n   -\n" -> [
  Start(List(None))
    Start(Item)
      Start(BlockQuote)
        Start(List(None))
          Start(Item)
          End(Item)
        End(List(false))
      End(BlockQuote)
      Start(List(None))
        Start(Item)
        End(Item)
      End(List(false))
    End(Item)
  End(List(false))
]

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