Skip to content

[fuzz result] off-by-one indent numbered list item with empty first line #810

@notriddle

Description

@notriddle

When a numbered list has a blank first line in its item, the line after it is supposed to be indented to match the imaginary space after it.

For examples:

1.
      pulldown-cmark thinks this is code, but commonmark.js and commonmark-hs don't.
      The dot in the list marker is at column two, so the child paragraph actually
      starts in column *four* (there's three spaces of indentation built into the list).
1.
  This is not in the list at all. It's a paragraph after it.
Details

Events from pulldown-cmark:

"0)\n  (\n" -> [
  Start(List(Some(0)))
    Start(Item)
      Text(Borrowed("("))
    End(Item)
  End(List(true))
]

Events from pandoc:

"0)\n  (\n" -> [
  Start(List(Some(0)))
    Start(Item)
    End(Item)
  End(List(true))
  Start(Paragraph)
    Text(Boxed("("))
  End(Paragraph)
]

Events from commonmark.js:

"0)\n  (\n" -> [
  Start(List(Some(0)))
    Start(Item)
    End(Item)
  End(List(true))
  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