-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Bug: OL nested list must use three spaces rather than two #2214
Description
Currently Lexical (0.2.9) treats numbered lists the same as unordered lists and indents nesting with four spaces. However lists where the marker takes up multiple spaces (ordered lists), must be treated special differently.
According to the commonmark spec:
If the list marker takes up two spaces, and there are three spaces between the list marker and the next non-whitespace character, then blocks must be indented five spaces in order to fall under the list item.
This can be quickly repro'd over here: https://codesandbox.io/s/lexical-rich-text-example-forked-e8comj?file=/src/Editor.js, by creating an ordered list and then clicking "Generate markdown" which logs the generated markdown.
refs #2208
I'm happy to try and fix my inputs with a regex if this isn't the desired functionality!