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

Fix highlighting for computed map keys #8

Merged
merged 2 commits into from
Mar 15, 2022
Merged

Fix highlighting for computed map keys #8

merged 2 commits into from
Mar 15, 2022

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Mar 4, 2022

This PR adds the missing : operator for computed map keys. Until now the end regex wasn't able to match anything and claimed the rest of the file as meta.mapping.key.

Before

CleanShot 2022-03-02 at 17 35 07@2x

After

CleanShot 2022-03-02 at 17 35 23@2x

Closes #809

dbanck added 2 commits March 4, 2022 17:53
The regex only matched for a `=` and was never able to find
a matching end, though matching everything until the end of
the file. Adding a `:` fixes this.
@dbanck dbanck added the bug Something isn't working label Mar 4, 2022
@jpogran jpogran added this to the 0.1.0 milestone Mar 7, 2022
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

@jpogran jpogran modified the milestones: 0.1.0, 0.2.0 Mar 15, 2022
@dbanck dbanck merged commit 9ad45a6 into main Mar 15, 2022
@dbanck dbanck deleted the b-map-key-syntax branch March 15, 2022 18:25
@dbanck dbanck modified the milestones: 0.2.0, 0.1.0 Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

non-literal string expression as map key breaks syntax highlighting
3 participants