Skip to content

Ordered and unordered lists are combined unless separated by three newlines #170

@noahmoss

Description

@noahmoss

Hello!

I noticed this behavior, which is not what I would have expected:

> (markdown.core/md-to-html-string "1. one\n2. two\n\n* three\n* four")
"<ol><li>one</li><li>two</li><li>three</li><li>four</li></ol>"

> (markdown.core/md-to-html-string "1. one\n2. two\n\n\n* three\n* four")
"<ol><li>one</li><li>two</li></ol><ul><li>three</li><li>four</li></ul>"

Most markdown parsers, as far as I can tell, will keep the ordered and unordered lists separate if there's even just a single newline between them.

Would you consider this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions