Hi, if I write:
test1test2
test3test4
Will be rendered as:
<p>test1test2
test3test4</p>
For work correctly I need to add two spaces like:
test1test2
test3test4
That becomes:
<p>test1test2</p>
<p>test3test4</p>
What is wrong? I've used in Vue:
marked(Text);
That is the way the spec defines a paragraph
Thank you, but I see other markdown editors that treat every line as a new paragraph.
What specs do I need to use to archive this?
It's possible with this package?
If you set the breaks and gfm options to true it will add a <br> on every line break
marked("test1test2" + "\n" + "test3test4", {breaks: true, gfm: true});
// <p>test1test2<br>test3test4</p>
Most helpful comment
If you set the
breaksandgfmoptions to true it will add a<br>on every line breakdemo