Skip to content

[fuzz result] tight, nested lists can wrap block structures within emphasis #797

@notriddle

Description

@notriddle
$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/pulldown-cmark`
- *foo
  - - 
  baz*
^D
<ul>
<li><em>foo
<ul>
<li>
<ul>
<li></li>
</ul>
</li>
</ul>
baz</em></li>
</ul>

That's not valid HTML. The block elements need to be siblings with the inlines, and that can only happen in a tight list.

Details

Events from pulldown-cmark:

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

Events from pandoc:

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

Events from commonmark.js:

"- *--\n  *  *\n  -*\n" -> [
  Start(List(None))
    Start(Item)
      Text(Boxed("*--"))
      Start(List(None))
        Start(Item)
          Start(List(None))
            Start(Item)
            End(Item)
          End(List(false))
        End(Item)
      End(List(false))
      Text(Boxed("-*"))
    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