vhtml icon indicating copy to clipboard operation
vhtml copied to clipboard

How to render html comment

Open ahmad-moussawi opened this issue 7 years ago • 1 comments
trafficstars

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

ahmad-moussawi avatar Nov 19 '18 14:11 ahmad-moussawi

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/

developit avatar Dec 04 '19 03:12 developit