Skip to content

Commit dbf3985

Browse files
authored
Merge pull request #206 from docsbydoxdox/hotfix/improve-jsdoc-regex
[hotfix] Prevent matching jsdoc syntax in the middle of a line.
2 parents 20a1c55 + 8a0e343 commit dbf3985

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { firstMatch, matches } from 'super-regex';
1010

1111
const REGEX_TIMEOUT = 1000;
1212

13-
const JSDOC_PATTERN = /[ \t]*\/\*\*\s*\n?([^*]*(\*[^/])?)*\*\//g;
13+
const JSDOC_PATTERN = /(^|[ \t]+)\/\*\*\s*\n?(?:[^*]*(?:\*[^/])?)*\*\//gms;
1414

1515
const IDENTIFIER_PATTERNS = [
1616
/^([a-z0-9]+):/i,

0 commit comments

Comments
 (0)