remarkable icon indicating copy to clipboard operation
remarkable copied to clipboard

Bad render when include html comments

Open emilioplatzer opened this issue 9 years ago • 3 comments

If the content was:

<!-- comment -->
# bad title

It not renders right.

You can see it running:

"use strict";

var Remarkable = require("remarkable");
var md = new Remarkable("full",{html:true});

console.log(md.render("# title\n")); //ok
// bad:
console.log(md.render("<!-- comment -->\n# title\n"));

emilioplatzer avatar Apr 24 '16 19:04 emilioplatzer

Yes. This appears to ignore inline Markdown on/near the comment when they would both render into the same block

CNSKnight avatar Dec 22 '16 00:12 CNSKnight

Also been running into this issue.

alexturpin avatar Jan 25 '17 18:01 alexturpin

Is there a rule hook that could be used to strip out the comment?

evilsoft avatar Apr 17 '18 23:04 evilsoft