-
-
Notifications
You must be signed in to change notification settings - Fork 325
Open
Description
In addition to #79, I'd like to propose //
comments within HTML tags, such as:
<form
class="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
<form
class="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.
bastianwegge, k1ng440, DanielSharkov, richardmarshall, davidovich and 8 more
Metadata
Metadata
Assignees
Labels
No labels