Azure / Azure/bicep

Expand/Collapse code broken in many places

Open
#13,892 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
Bicep CLI version 0.26.170 (e9abaf16a5)

**Describe the bug**
Expand/Collapse code broken in many places

**To Reproduce**
I have already described one of the issues here #13676 . But there are more.
Example file:

```bicep
type foo = {
@description('''Description
Some more info

| column1 | column2 | column3 | column4 | column5 | column6 | column7 |
|---------|---------|---------|---------|---------|---------|---------|
| value1 | value2 | value3 | value4 | value5 | value6 | value7 |
| value3 | value4 | value3 | value4 | value5 | value6 | value7 |
| value3 | value4 | value3 | value4 | value5 | value6 | value7 |
| value3 | value4 | value3 | value4 | value5 | value6 | value7 |
| value3 | value4 | value3 | value4 | value5 | value6 | value7 |
| value3 | value4 | value3 | value4 | value5 | value6 | value7 |
| value3 | value4 | value3 | value4 | value5 | value6 | value7 |
| value3 | value4 | value3 | value4 | value5 | value6 | value7 |

* test
* test2

sasda

''')
a: int
b: string
c: bool
}

```
collapsing description results in:

![image](https://github.com/Azure/bicep/assets/11890856/84831fbb-e45c-4b01-a58b-6982e9fd4edc)

it seems at some places instead of collapsing on the closing sign of the code it collapses based on lines or something.

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the example Bicep file and compare the collapse boundary with the closing delimiter of the description. Read the related report in #13676 and investigate the expand/collapse entry point used for multiline descriptions and other affected locations. Done means collapsing consistently hides the complete code block without truncating or including unrelated lines.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.