Bug: Quote markdown export missing newline
See original GitHub issueWhen markdown exporting editor content quotes only have one line when two are needed. In markdown, blockquote content followed by a single line is treated as a continuation of the blockquote content.
Lexical version: 0.2.9
Steps To Reproduce
- Erase playground content
- type
> foo
hit [enter], typebar
- Note that bar is outside the blockquote
- toggle markdown view
- Take output and put into a markdown preview
- See that
bar
is inside the blockquote content
See commonmark: https://spec.commonmark.org/dingus/?text=> foo bar baz asdf See marked: https://marked.js.org/demo/?outputType=html&text=> foo bar baz bar&options={ "baseUrl"%3A null%2C "breaks"%3A false%2C "extensions"%3A null%2C "gfm"%3A true%2C "headerIds"%3A true%2C "headerPrefix"%3A ""%2C "highlight"%3A null%2C "langPrefix"%3A "language-"%2C "mangle"%3A true%2C "pedantic"%3A false%2C "sanitize"%3A false%2C "sanitizer"%3A null%2C "silent"%3A false%2C "smartLists"%3A false%2C "smartypants"%3A false%2C "tokenizer"%3A null%2C "walkTokens"%3A null%2C "xhtml"%3A false }&version=master
The current behavior
Content following text is treated as blockquote
The expected behavior
Content in editor text following a quote node should not formatted as blockquote
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
It does seem fixed in the playground now! @fantactuka I’ll close this out for now?
@thegreatercurve please reopen this, it has not been fixed in V2 and is still a bug
For block quotes to be escaped in markdown, there must be two new lines, not one.
This input:
Creates this markdown:
Which in any markdown renderer, renders this way:
refs https://github.com/facebook/lexical/pull/2248