Templ parse err when script has regex:
const clientIdMatch = evt.detail.message.match(/data-client-id="([^"]+)"/);
Error: parsing error: template closing brace not found
but write regex twice will no error:
const regex = /data-client-id="([^"]+)"/;
const clientIdMatch = evt.detail.message.match(/data-client-id="([^"]+)"/);
Try this also error as above:
const regex = /data-client-id="([^"]+)"/;
const clientIdMatch = evt.detail.message.match(regex);
Environment:
- Go: go version go1.23.3
- templ: v0.3.920