Skip to content

Converting ordered and unordered lists to Markdown adds newlines. #1881

@bgreenlee

Description

@bgreenlee

Describe the bug

Given the following Markdown:

Ordered list:
1. one
2. two
3. three

Unordered list:
* one
* two
* three

Checklist:
* [ ] one
* [x] two
* [ ] three

Converting this to blocks with tryParseMarkdownToBocks and then back to Markdown with blocksToMarkdownLossy produces:

Ordered list:

1. one

2. two

3. three

Unordered list:

* one

* two
 
* three

Checklist:

* [ ] one
* [x] two
* [ ] three

(Note the checklist is rendered to Markdown correctly.)

While this does import back into BlockNote correctly, they are not valid Markdown lists.

Image

To Reproduce

This can be reproduced in the Playground: https://blocknote-main.vercel.app/interoperability/converting-blocks-to-md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions