Marked: New line not work

Created on 18 Dec 2016  Â·  6Comments  Â·  Source: markedjs/marked

New line inside paragraph not work.
immagine

Instead if i put two spaces after the new line i have the correct result...

immagine

why this strange behavior??

Has anyone found a solution?Thanks :)

question

Most helpful comment

Have you set breaks: true?

All 6 comments

The latest Commonmark spec says to put a \ at the end of the line, but I'm not sure it's implemented here

Have you set breaks: true?

I had a same problem, but @j16180339887 's comment helped! Thanks :D
I should've read configurations thoroughly

Solved @joshbruce

Have you set breaks: true?

Thanks @joeky888. This worked for me.

marked(markdown, { breaks: true })

You can read the full set of options on the USING_ADVANCED docs page.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

priyesh-diukar picture priyesh-diukar  Â·  3Comments

thyxsl picture thyxsl  Â·  4Comments

mjbvz picture mjbvz  Â·  4Comments

UziTech picture UziTech  Â·  4Comments

camwiegert picture camwiegert  Â·  4Comments