hashicorp / hcl2

Former temporary home for experimental new version of HCL
https://github.com/hashicorp/hcl
Mozilla Public License 2.0
373 stars 66 forks source link

Formatter inserts unwanted space between two consecutive interpolation sequences #65

Closed apparentlymart closed 5 years ago

apparentlymart commented 5 years ago

Given a string like this:

  "${foo}${bar}"

...the auto-formatter wants to insert a space between the two sequences, changing the meaning:

  "${foo} ${bar}"

Spacing should never be adjusted when we're between OQuote/OHeredoc tokens and their corresponding CQuote/CHeredoc tokens, except within interpolation/directive sequences.