remarkable
remarkable copied to clipboard
html: true option does not handle the case of line break after HTML tag
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
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