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

Incorrect syntax highlighting for /* in strings #6

Open
tobbbles opened this issue Sep 19, 2021 · 4 comments
Open

Incorrect syntax highlighting for /* in strings #6

tobbbles opened this issue Sep 19, 2021 · 4 comments

Comments

@tobbbles
Copy link

The following snippet:

 filters = {
      name                = "ubuntu/images/*ubuntu-hirsute-21.04-amd64-server-*"
      root-device-type    = "ebs"
      virtualization-type = "hvm"
    }

Is incorrectly rendered, with /* being incorrectly deemed as a multi-line comment start, resulting in the following:
image

The extension should not consider /* to be the begging of a multi-line comment if it's in a string

@webdog
Copy link

webdog commented Oct 5, 2021

Similarly, a quotation immediately followed by a non-space character breaks the syntax highlighting.

image

Adding a space to the version key fixes the syntax highlighting, and seems to work, but it looks odd to have a space in the string.

image

@sebracs
Copy link

sebracs commented Jan 2, 2022

@webdog I saw this too. It actually breaks on the official Getting Started tutorial for packer, which is not ideal
https://learn.hashicorp.com/tutorials/packer/docker-get-started-build-image?in=packer/docker-get-started
image

@CallMeLaNN
Copy link

I'd better use this for now

settings.json

"files.associations": {
    "*.hcl": "terraform"
}

@PJB3005
Copy link

PJB3005 commented Aug 30, 2022

This appears to be fixed on master. Pushing a new version to the VSCode marketplace would be grand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants