markdown-to-jsx icon indicating copy to clipboard operation
markdown-to-jsx copied to clipboard

\n character not converted to newline while rendering

Open SnehaKolukuluri opened this issue 3 years ago • 3 comments

This is my sample code const str = '# Heck Yes\n\nThis is great!'

<Markdown options={{ wrapper: 'article' }}>
  {str}
</Markdown>;

rendered output Screenshot 2021-12-21 at 2 24 16 PM

SnehaKolukuluri avatar Dec 21 '21 08:12 SnehaKolukuluri

hey @quantizor, any updates on this?

suyalcinkaya avatar Feb 15 '24 15:02 suyalcinkaya

Try String.raw https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw

quantizor avatar Feb 15 '24 15:02 quantizor

This worked for me image

Ovodo avatar May 17 '24 21:05 Ovodo