Skip to content

Commit 8a9f409

Browse files
committed
0.9.0
1 parent 13f93ba commit 8a9f409

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
out
22
node_modules
33
.vscode-test/
4-
*.vsix
54
.DS_Store

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ type = matched[8]+matched[10]
1919
name = matched[6]+matched[12]
2020
^(([ \t]*)(function[ \t]+)?()()([_A-Za-z][_A-Za-z0-9]+)[ \t]*(\(\))+[ \t*]*([{\(])[^(]?|([ \t]*[#]+[ \t]+)(MARK|NOTE|REVIEW|TODO|FIXME|!!!|\?\?\?)(:[ \t]*)(.*)()())
2121
22+
const test = matched[8];
23+
if(test) {
24+
const type = matched[8];
25+
const name = matched[6];
26+
} else {
27+
const type = matched[10];
28+
const name = matched[12];
29+
}
30+
2231
if(matched[8]) {
2332
const type = matched[8];
2433
const name = matched[6];
1.13 MB
Binary file not shown.

src/documentSymbolProvider.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,8 @@ export class ShellScriptDocumentSymbolProvider implements vscode.DocumentSymbolP
1616
const matchedList = this.matchAll(this.pattern, text);
1717

1818
return matchedList.map((matched) => {
19-
const test = matched[8];
20-
if(test) {
21-
const type = matched[8];
22-
const name = matched[6];
23-
} else {
24-
const type = matched[10];
25-
const name = matched[12];
26-
}
19+
const type = matched[8]+matched[10];
20+
const name = matched[6]+matched[12];
2721
const kind = tokenToKind[type];
2822

2923
const position = document.positionAt(matched.index || 0);

0 commit comments

Comments
 (0)