-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Error generating code when nesting <a> and text in parent element. #998
Comments
Hi @zachczx , thanks for the bug report. You have encountered a common footgun with templ, the issue is that the word after the |
Ah I'm so sorry, I read the docs and these lines many times, but I must've had a brain fart and skipped over the "if" after. |
Did we not change the behaviour of the |
I had the same thought @a-h .. Maybe did we only implement it for one keyword to start with? |
Hi, I encountered a minor bug (?) with Templ. Not a dealbreaker by any means, just made me puzzled for half an hour before realizing this was the cause when templ generate kept throwing errors.
This doesn't work - having an "a" tag immediately followed by text - throws error when generating code.
This doesn't either.
This works fine.
templ info
outputtempl info
(✓) os [ goos=windows goarch=amd64 ]
(✓) go [ location=C:\Program Files\Go\bin\go.exe version=go version go1.23.3 windows/amd64 ]
(✓) gopls [ location=C:\Users\z\go\bin\gopls.exe version=golang.org/x/tools/gopls v0.16.2 ]
(✓) templ [ location=C:\Users\z\go\bin\templ.exe version=v0.2.793 ]
The text was updated successfully, but these errors were encountered: