- Comments closed with more than 2 dashes have their closing
> escaped and replaced by > resulting in actual markup being commented out. Note that for some dash counts, comments are handled okay like <!--comment-----> is okay.
- Comments opened with 3 dashes have their first character clipped.
<!---comment--> becomes <!---omment-->
To reproduce
import linkifyHtml from 'linkify-html';
function main() {
const html = `<div><!---comment--->Markup</div>`
const result = linkifyHtml(html, {defaultProtocol: "https"})
console.log({html, result})
}
main()
See that the output of linkifyHtml("<div><!---comment--->Markup</div>", {defaultProtocol: "https"}) is "<div><!---omment--->Markup</div>-->"