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

Error: unexpected end keyword #68

Closed jasikpark closed 2 years ago

jasikpark commented 2 years ago

When formatting

<script></script>
{{ if  }}
  <script></script>
{{ end }}

I get this error: Error: Encountered unexpted end keyword. in prettier-plugin-go-template@0.0.12-beta-1

jasikpark commented 2 years ago

When given

<span></span>
{{ if  }}
  <script></script>
{{ end }}

it formats without complaint. with thorough testing of this, I think there's something weird w/ this particular configuration of script tags

NiklasPor commented 2 years ago

Should be fixed in prettier-plugin-go-template@0.0.12-beta.5

mtlynch commented 2 years ago

Thanks for this fix! I was running into this as well. Upgrading to 0.0.12 fixed it.

https://app.circleci.com/pipelines/github/mtlynch/picoshare/540/workflows/c5ea13f9-c783-478d-ba91-8704a21199ea/jobs/1920

NiklasPor commented 2 years ago

Always happy to help 🚀