VS Code folding gets confused if multi line string is not indented
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
VS Code 0.3.255
**Describe the bug**
Foldi
**To Reproduce**
Open the following up in VS Code, then attempt to fold the resource block
```bicep
resource foo 'Microsoft.AAD/domainServices@2021-03-01' = {
name: '''
foo
'''
}
```
Rather than collapse the whole resource, it only gets partially collapsed (up until the multi line string)

**Additional context**
The problem seems to be caused by the contents of the multi line string not being indented. If you indent the `foo` line by just a single space (like below), then the folding behaves correctly
```bicep
resource foo 'Microsoft.AAD/domainServices@2021-03-01' = {
name: '''
foo
'''
}
```

Contributor guide
Research direction
Start by opening the provided Bicep resource in VS Code and reproducing folding with the multiline string contents unindented, then compare it with the indented example. Trace the folding behavior responsible for resource blocks and verify that folding collapses the entire resource in both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100