markedjs / marked

A markdown parser and compiler. Built for speed.
https://marked.js.org
Other
33.18k stars 3.39k forks source link

After parsing the content enclosed by xx, the line breaks were lost. How can we preserve the line breaks after parsing #3535

Closed swanfly closed 18 hours ago

swanfly commented 1 day ago

After parsing the content enclosed by xx, the line breaks were lost. How can we preserve the line breaks after parsing

input: abc def

parsed:

abc def

image
UziTech commented 1 day ago

Add a third backtick

abc def

abc
def
swanfly commented 1 day ago

If I want to keep a line break between two backsticks, can I do it?

UziTech commented 16 hours ago

Ya you can create a custom extension to do it with two backticks

swanfly commented 6 hours ago

Ya you can create a custom extension to do it with two backticks

i got it, thank you!