We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3741355 + 855f895 commit 0c36095Copy full SHA for 0c36095
src/common.ts
@@ -113,7 +113,15 @@ export class SymbolNode {
113
const docSymbol = docSymbols[i];
114
for (let j = i + 1; j < docSymbols.length; j++) {
115
const sibling = docSymbols[j];
116
- if (docSymbol.range.contains(sibling.range)) {
+ // The second clause handles the case when the sibling is a region,
117
+ // so the "endregion" might not be contained by the docSymbol.range
118
+ if (
119
+ docSymbol.range.contains(sibling.range) ||
120
+ (
121
+ docSymbol.range.contains(sibling.range.start) &&
122
+ sibling.detail === "__om_Region__"
123
+ )
124
+ ) {
125
docSymbol.children.push(sibling);
126
docSymbols.splice(j, 1);
127
j--;
0 commit comments