Open romshark opened 1 month ago
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.