Skip to content

How to support HTML Comments? #432

@cjenkscybercom

Description

@cjenkscybercom

Trying to extend this library so that it has feature parity with a Java client that allows (but doesn't render) HTML comments. Haven't found any existing plugins that do this, and the html: true option does support this but it also supports <script> tags so that's a no-go. Also, typical workarounds like empty links don't work.

Use case for comments is a templating scenario, like how GitHub supports issue templates; inside the markup, you have comments explaining what each of the sections are for.

It seems like what I need to do is write a block and inline rule (since comments can be inline or across many lines) that generate maybe COMMENT_START and COMMENT_END tokens, and then a renderer that consumes those tokens?

Any suggestions welcome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions