Skip to content
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

fix: don't self-close empty script tags #55

Merged
merged 1 commit into from Jun 20, 2022

Conversation

brentd
Copy link
Contributor

@brentd brentd commented Jun 20, 2022

Hi, I encountered a bug in v2 of templ where <script src="..."></script> elements are being self-closed by the formatter and end up looking like this:

<script src="..."/></script>

I added a reproducing test case and fixed it, but I'm not sure if my implementation change makes sense.

Thanks for the review and thanks for making templ, I love the concept!

@a-h
Copy link
Owner

a-h commented Jun 20, 2022

Oops, good catch, thanks! I'll check it out.

And thanks for using templ. I'm using it in production with a company - it's producing hundreds of HTML documents that get converted into contracts every day.

@a-h a-h merged commit c54832e into a-h:main Jun 20, 2022
@a-h
Copy link
Owner

a-h commented Jun 20, 2022

Thanks for the contribution! 👍🏻

@brentd brentd deleted the no-self-closing-script-tag branch July 2, 2022 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants