Skip to content

Commit d91948e

Browse files
committed
fix(docs): add word boundary to baseToolRegex to prevent false matches
1 parent 98c51df commit d91948e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/generate-docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,7 @@ function extractToolInfo(
16611661
if (spreadMatch) {
16621662
const baseVarName = spreadMatch[1]
16631663
const baseToolRegex = new RegExp(
1664-
`export\\s+const\\s+${baseVarName}[^=]*=\\s*\\{`,
1664+
`export\\s+const\\s+${baseVarName}(?=[^a-zA-Z0-9_]|$)[^=]*=\\s*\\{`,
16651665
'i'
16661666
)
16671667
const baseToolMatch = fileContent.match(baseToolRegex)

0 commit comments

Comments
 (0)