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

How to support HTML Comments? #432

Open
cjenkscybercom opened this issue Mar 27, 2024 · 0 comments
Open

How to support HTML Comments? #432

cjenkscybercom opened this issue Mar 27, 2024 · 0 comments

Comments

@cjenkscybercom
Copy link

cjenkscybercom commented Mar 27, 2024

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!

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