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

Broken highlighting with nested interpolations #18

Closed
alex-aver opened this issue Feb 9, 2017 · 4 comments
Closed

Broken highlighting with nested interpolations #18

alex-aver opened this issue Feb 9, 2017 · 4 comments
Labels

Comments

@alex-aver
Copy link

If you have a resource attribute with nested interpolations where you need to use quotes, the highlighting in the rest of the document breaks. It's easier to explain with examples:

The following statement breaks the highlighting:
user_data = "${file("${path.module}/text_files/ec2/user_data_scripts/ecs_app")}"

But if I removed a pair of quotes, highlighting works fine:
user_data = "${file(${path.module}/text_files/ec2/user_data_scripts/ecs_app)}"

Or, if I were to keep the quotes, but lose the ${path.module}, highlighting works fine:
user_data = "${file("text_files/ec2/user_data_scripts/ecs_app")}"

screen shot 2017-02-09 at 10 09 59 am
screen shot 2017-02-09 at 10 09 36 am
screen shot 2017-02-09 at 10 09 12 am

@alexlouden
Copy link
Collaborator

Ah interesting, thanks for letting me know! I'll have a look at fixing it on the weekend, unless you'd like to have a look? When you get into it it's just regex!

@alexlouden
Copy link
Collaborator

Hey @alex-aver thanks again for reporting this, it should be fixed now. I've made a new release, which should be available to update to in a few hours.

screen shot 2017-02-13 at 10 57 16 am

@alex-aver
Copy link
Author

@alexlouden I didn't get a chance to look for replies until now, and what prompted me to do so was the fact that this was suddenly working! Thanks for this!

@alexlouden
Copy link
Collaborator

No worries, glad it's working for you!

patrickrgaffney added a commit to patrickrgaffney/Terraform.tmLanguage that referenced this issue Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants