Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
saurabhdaware opened this issue May 15, 2020 · 0 comments

Comments

@saurabhdaware
Copy link

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 saurabhdaware changed the title html: true options does not handle the case of line break after HTML tag html: true option does not handle the case of line break after HTML tag May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant