You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<style>/* one */</style> /* two */ <!-- three -->
<style>/* one */</style> /* two */ <!-- three -->
<style>/* one */</style> /* two */ <!-- three -->
What did you see instead?
Comments are stripped.
<style>/* one */</style> /* two */ <!-- three -->
<style>/* one */</style> /* two */ <!-- three -->
<style> </style> /* two */
This behaviour is apparently intentional (#14256), but it is surprising and undocumented. Templates already have their own special comment syntax ({{/* */}}), so i didn't expect that they would gobble up HTML and CSS (and presumably JS) comments as well. This needs to be called out in the documentation, ideally with a rationale and workaround.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?go1.11.1 (playground)
Does this issue reproduce with the latest release?
Yes.
What did you do?
https://play.golang.org/p/WPnEwLYTBkF
What did you expect to see?
Comments preserved in output.
What did you see instead?
Comments are stripped.
This behaviour is apparently intentional (#14256), but it is surprising and undocumented. Templates already have their own special comment syntax (
{{/* */}}
), so i didn't expect that they would gobble up HTML and CSS (and presumably JS) comments as well. This needs to be called out in the documentation, ideally with a rationale and workaround.The text was updated successfully, but these errors were encountered: