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
In addition to #79, I'd like to propose // comments within HTML tags, such as:
<formclass="flex"
// This comment here explains why the following attribute is necessary,
// namely to prevent submit when hitting the enter key.
// But templ won't allow this comment to be here and throws syntax errors.
action="javascript:void(0)"
>
Current Workaround
Currently, the comments must be put above the HTML tag, which is not always convenient.
// Use action="javascript:void(0)" to prevent submit on enter
<formclass="flex"
action="javascript:void(0)"
>
Since // is not a valid token inside an HTML tag IMHO it should be possible to allow Go comments within tags that aren't included in the compiled HTML.
The text was updated successfully, but these errors were encountered:
I would also love this. We are currently developing libraries for internal use and I'd also like to add some comments between alpine relevant directives:
<div
// Alpine data initialization
// makes this
// does that
x-data="{
...
}"
// Alpine component initialization
// makes this
// does that
x-init="
...
"
@keydown.escape.window="commandOpen = false"
class="relative z-50 w-auto h-auto"
>
...
</div>
We do lots of these and I'd like to add some comments to make things clearer.
In addition to #79, I'd like to propose
//
comments within HTML tags, such as:Current Workaround
Currently, the comments must be put above the HTML tag, which is not always convenient.
Since
//
is not a valid token inside an HTML tag IMHO it should be possible to allow Go comments within tags that aren't included in the compiled HTML.The text was updated successfully, but these errors were encountered: