-
-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parse error with templ elements #86
Comments
Thanks for trying out templ, and for the issue report. 😁 I'd assumed that using the This is two related issues. I'll move the formatting one into its own issue, and resolve this one as the parsing error. I've added a commit for this issue at c160cc4 - the unit test on that commit includes your example. |
Please take a look at #87 too. I've added a commit for that too. |
7efc71c seems to break my layouts function, which goes something like templ x() {
@layouts.Main("", site, owner, layouts.MainOpts{Me: opts.Me}) {
<main id="index">
</main>
}
} templ couldn't seem to parse the child properly, so the HTML just gets pasted into the Go code. |
Ah, you're right, I forgot to allow package names. |
I'm fairly sure this is solved in the referenced commit (2nd one) and the changes released in the latest releases of templ, if not please do re-open! |
The following snippet:
gets formatted to become:
I don't think this is expected behavior.
Even worse, this code:
actually just errors out completely with a parsing error:
The text was updated successfully, but these errors were encountered: