NiklasPor / prettier-plugin-go-template

Fixes prettier formatting for go templates 🐹

Home Page:prettier-plugin-go-template-niklaspor.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Idempotency bug w/ unclosed multiline string

jasikpark opened this issue · comments

When prettier-plugin-go-template@0.1.2-beta.5 is given:

{{ defi "Norwegian krone#
    "dialing_code" "+47" 
    "dialing_code" "+47" 
}}

it first formats it as

{{ defi "Norwegian krone#
  "dialing_code" "+47"
  "dialing_code" "+47"
}}

and on a second format as

{{ defi "Norwegian krone#
  "dialing_code" "+47"
  "dialing_code" "+47"
  }}

Is # a valid beginning to some go template clause? It reads to me like this should be an error, but I'm unsure...