remarkable icon indicating copy to clipboard operation
remarkable copied to clipboard

html: true option does not handle the case of line break after HTML tag

Open saurabhdaware opened this issue 4 years ago • 0 comments

This code

const { Remarkable } = require("remarkable");

const md = new Remarkable({ html: true });

const markdownTextBug = `
<div
  class="hi"
>hello</div>
`;

console.log(md.render(markdownTextBug));

const markdownTextWorking = `
<div class="hi">hello</div>
`;

console.log(md.render(markdownTextWorking));

returns this a screenshot of output that displays how first console log did not escape html but the second one did


Usually prettier and other formatting tools format the code in 1st way so would be better if it can render it properly.

Also great library! Thank you for building it :D

saurabhdaware avatar May 15 '20 18:05 saurabhdaware