Skip to content

Commit 75e0b1a

Browse files
committed
outline fix for #36
1 parent 650d70b commit 75e0b1a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/providers/ObjectScriptClassSymbolProvider.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,21 @@ export class ObjectScriptClassSymbolProvider implements vscode.DocumentSymbolPro
1010
let classItSelf = null;
1111
let symbols: vscode.DocumentSymbol[] = [];
1212

13+
let inComment = false;
1314
for (let i = 0; i < document.lineCount; i++) {
1415
const line = document.lineAt(i);
1516

17+
if (line.text.match(/\/\*/)) {
18+
inComment = true;
19+
}
20+
21+
if (inComment) {
22+
if (line.text.match(/\*\//)) {
23+
inComment = false;
24+
}
25+
continue;
26+
}
27+
1628
const classPat = line.text.match(/^(Class) (%?\b\w+\b(?:\.\b\w+\b)+)/i);
1729
if (classPat) {
1830
let end = new vscode.Position(document.lineCount - 1, 0);

0 commit comments

Comments
 (0)