Skip to content

Options::ENABLE_DEFINITION_LIST incorrectly parses a DefinitionList with an empty title. #997

Closed

Description

@ytmimi

Kind of an odd case, but for some reason, a link reference definition followed by 4 spaces of indentation followed by a colon is parsed as an empty definition list. I'm not sure if this is valid given that there isn't a definition title. pandoc just parses this as a paragraph.

[a]: /url
    
:

Running cargo run -- -e -D produces:

14..17: Start(DefinitionList)
14..15: Start(DefinitionListTitle)
14..15: End(DefinitionListTitle)
15..17: Start(DefinitionListDefinition)
15..17: End(DefinitionListDefinition)
14..17: End(DefinitionList)
EOF

Without the -D flag the above input is parsed as:

14..17: Start(Paragraph)
10..15: HardBreak
15..16: Text(Borrowed(":"))
14..17: End(Paragraph)
EOF

Activity

  1. ytmimi commented on Jan 2, 2025

    @ytmimi
    ContributorAuthor

    What's a little odd about the parsing without the -D flag is that the HardBreak starts before the Paragraph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions