-
-
Notifications
You must be signed in to change notification settings - Fork 349
Closed
Description
The templ parser throws an error when JavaScript code inside a <script> tag has an inline comment.
Steps to Reproduce
templ ScriptExample() {
<script>
const category = path.split('/')[2]; // example comment
</script>
}Actual Behavior
parsing error: template closing brace not found
Workaround
Moving the comment to its own line resolves the issue:
templ ScriptExample() {
<script>
// example comment
const category = path.split('/')[2];
</script>
}Environment
- templ version: v0.3.943
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels