Skip to content

Commit 1459be8

Browse files
committed
Added _ to allowed symbol characters.
1 parent 0263c85 commit 1459be8

File tree

1 file changed

+8
-8
lines changed
  • packages/doxdox-parser-custom/src

1 file changed

+8
-8
lines changed

packages/doxdox-parser-custom/src/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ const REGEX_TIMEOUT = 1000;
1313
const JSDOC_PATTERN = /(^|[ \t]+)\/\*\*\s*\n?(?:[^*]*(?:\*[^/])?)*\*\//gms;
1414

1515
const IDENTIFIER_PATTERNS = [
16-
/^([a-z0-9]+):/i,
17-
/^(?:static\s+)?([a-z0-9]+)\s*\(/i,
18-
/^(?:export\s+)?(?:var|let|const)\s+([a-z0-9]+)\s*=/i,
19-
/^(?:this|exports)\.([a-z0-9]+)\s*=/i,
20-
/^(?:export\s+)?function\s+([a-z0-9]+)\s*\(/i,
21-
/^class\s+([a-z0-9]+)\s*{/i,
22-
/^((?:[a-z0-9]+)(\.prototype)?\.(?:[a-z0-9]+))/i,
23-
/^[a-z0-9]+\s*as\s*([a-z0-9]+)/i
16+
/^([a-z0-9_]+):/i,
17+
/^(?:static\s+)?([a-z0-9_]+)\s*\(/i,
18+
/^(?:export\s+)?(?:var|let|const)\s+([a-z0-9_]+)\s*=/i,
19+
/^(?:this|exports)\.([a-z0-9_]+)\s*=/i,
20+
/^(?:export\s+)?function\s+([a-z0-9_]+)\s*\(/i,
21+
/^class\s+([a-z0-9_]+)\s*{/i,
22+
/^((?:[a-z0-9_]+)(\.prototype)?\.(?:[a-z0-9_]+))/i,
23+
/^[a-z0-9_]+\s*as\s*([a-z0-9_]+)/i
2424
];
2525

2626
const parser = async (cwd: string, path: string): Promise<File> => {

0 commit comments

Comments
 (0)