facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
19.28k stars 1.63k forks source link

Bug: When parsing a new paragraph after any list, the paragraph is parsed as part of the list. #6606

Open aleksandr-konovalov opened 2 weeks ago

aleksandr-konovalov commented 2 weeks ago

Lexical version: 0.17.1

Steps To Reproduce

  1. Open lexical playground
  2. Enable "Preserve newlines in Markdown"option
  3. Create bullet or numbered list
  4. Create new paragraph after the list without additional line breaks

Related to the fix: https://github.com/facebook/lexical/pull/6020 by @potatowagon (as part of the release https://github.com/facebook/lexical/releases/tag/v0.16.0)

Link to the video:

https://github.com/user-attachments/assets/700229aa-c055-4b41-a881-920069d2de9f

The current behavior

The paragraph becomes part of the list

The expected behavior

The paragraph remains independent

Impact of fix

Critical. Reproduce rate: 100%.

keiseiTi commented 1 week ago

You should enable this configuration to preserve new lines.

image
aleksandr-konovalov commented 1 week ago

With this configuration, this is the issue in the second part of the video.

keiseiTi commented 1 week ago

With this configuration, this is the issue in the second part of the video.

GitHub's markdown editor also has this effect.

aleksandr-konovalov commented 1 week ago

Yes, it's true. Is it correct to put two line breaks after the list?

keiseiTi commented 1 week ago

Yes, it's true.

aleksandr-konovalov commented 1 week ago

But now the “preserve newlines in markdown” setting removes the line break after the list, which it should not do. I recorded a video as an example. By the way, github does not remove it.

https://github.com/user-attachments/assets/0081fce4-c18a-4078-95fb-8601341009b3