question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Quote markdown export missing newline

See original GitHub issue

When 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

  1. Erase playground content
  2. type > foo hit [enter], type bar
  3. Note that bar is outside the blockquote
  4. toggle markdown view
  5. Take output and put into a markdown preview
  6. 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:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
hanfordcommented, Jun 29, 2022

It does seem fixed in the playground now! @fantactuka I’ll close this out for now?

1reaction
hanfordcommented, Jun 15, 2022

@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: image

Creates this markdown: image

Which in any markdown renderer, renders this way: image

refs https://github.com/facebook/lexical/pull/2248

Read more comments on GitHub >

github_iconTop Results From Across the Web

Paper's markdown export does not add new lines after headings
Solved: Repro: * Create a document with headers of various sizes.
Read more >
How to add new line in Markdown presentation?
When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then...
Read more >
org-mode quote block line feed missing
It defines a new keyword HTML_QUOTE_KEEP_NEWLINES . If that keyword is set to t newlines are preserved in quote blocks only.
Read more >
Markdown Syntax Documentation - Daring Fireball
Markdown's syntax is intended for one purpose: to be used as a format for ... “Convert Line Breaks” option) which translate every line...
Read more >
Markdown syntax guide | Bitbucket Data Center and Server 8.6
The file can contain only Markdown. Last modified on Nov 24, 2022. Was this helpful? Yes. No. It wasn't accurate. It wasn't clear....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found