NiklasPor / prettier-plugin-go-template

Fixes prettier formatting for go templates 🐹
prettier-plugin-go-template-niklaspor.vercel.app
MIT License
343 stars 24 forks source link

Adds extra closing tags when closing tag is inside go block #66

Closed jasikpark closed 2 years ago

jasikpark commented 2 years ago

with

<span>{{ define whatever }}
</span>
{{ end }}

as input, prettier-plugin-go-template@0.0.12-beta-1 outputs:

<span><span>{{ define whatever }}
</span>
{{ end }}
 </span>

adding additional <span> tags

It doesn't error and return the original text like the invalid test case does, I think it should probably do so, since I don't see a way to reasonably format it

jasikpark commented 2 years ago

This might be a duplicate of #59?

NiklasPor commented 2 years ago

Yes, exact duplicate of #59.