-
Notifications
You must be signed in to change notification settings - Fork 27
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
Support HTML comments #68
Comments
@whisk great feature idea! Thanks for adding this. I like solution and I think it follows the existing patterns nicely. It's ok that it's not a real HTML element. I just implemented something similar for CSS: https://github.com/chasefleming/elem-go/blob/main/styles/styles.go#L38 I think Did you want to take this on as well or just posting the issue? |
Hi @chasefleming, please check this PR #71 :) |
added support for HTML comments #68
Problem
Yes, you can render comments as
Text
nodes:But it's too verbose and error prone (could easily mix up opening/closing comment quotes)
Possible solution
Add
Comment
element:Pros: intuitive
Cons:
As far as I know, many programming language parsers consider comments as properties of "real" nodes, not as separate nodes. But that seems too complex both to use and implement.
The text was updated successfully, but these errors were encountered: