hashicorp / hashicorp/syntax

Wrong highlighting for function that splits over multiple lines inside a string

Open
#128 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
HCL
Stars
31
Forks
12
Avg merge
7m
Merged PRs (30d)
1

Description

Originally reported in https://github.com/hashicorp/vscode-terraform/issues/1756

## Example

```hcl
locals {
list = [
"1", "2", "3"
]
function = [
for i in local.list : "Out: ${join("-", [i, "join"]
)}" if i != "2"
]
}

output "test" {
value = local.function
}
```

![Screenshot 2024-05-15 at 2 05 22 PM](https://github.com/hashicorp/vscode-terraform/assets/80794259/4fde980e-8a0a-4599-abf6-279cf6ab3d75)

It breaks some time after the [0.4.2](https://github.com/hashicorp/syntax/releases/tag/v0.4.2) release

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.