diff --git a/docgen/template/helpers.ts b/docgen/template/helpers.ts index a6737440e..acc5e2ebf 100644 --- a/docgen/template/helpers.ts +++ b/docgen/template/helpers.ts @@ -209,6 +209,7 @@ export function linkify(this: DocItemWithContext, text?: string, joinLines?: boo // brackets). // It's not foolproof, results still need to be reviewed. const suffix = node.nodeType == 'FunctionDefinition' ? "_" + node.functionSelector : ""; + // nosemgrep: detect-non-literal-regexp ret = ret.replace(new RegExp(`\`?\\b${node.name}\\b(\\(\\))*\`?(?![^\\[]*])(? { + // nosemgrep: detect-non-literal-regexp ret = ret.replace(new RegExp(`\`?\\b${s}\\b(\\(\\))*\`?(?![^\\[]*])(?