Skip to content

Bug: Nested list Markdown ingestion #2208

@hanford

Description

@hanford

Lexical isn't handling nested markdown lists with whitespace properly. When passing a nested list in like this:

- foo

  - bar

Lexical creates two separate lists with a paragraph in between them. Though this is in fact legitimate syntax for nested lists in commonmark and other popular tools understand this.

Lexical version: 0.3.3

Note that Lexical doesn't emit lists like this, but when passing in existing markdown this occurs

Link to code example:

https://codesandbox.io/s/lexical-rich-text-example-forked-m96rm2?file=/src/Editor.js

The current behavior

Lexical creates two separate lists, separated by a paragraph

The expected behavior

Lexical should create a single list, with the child list properly nested within

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions