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 render html comment #15

Open
ahmad-moussawi opened this issue Nov 19, 2018 · 1 comment
Open

How to render html comment #15

ahmad-moussawi opened this issue Nov 19, 2018 · 1 comment
Labels

Comments

@ahmad-moussawi
Copy link

Is it possible to render HTML comments, I am using this to render server side templates, and it would be useful to print out html comments so it helps with debugging and getting meta information

@developit
Copy link
Owner

There isn't a Comment syntax for JSX. You can preprocess the Strings array before it reaches htm, and then undo that preprocessing using the tag function you pass. Here's an example that enables only certain comments (IE conditional comments):

https://jsfiddle.net/developit/jwb4nkao/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants