From 3ba02ea0e4e5cfeb7227835fac62391bf9789577 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 10 Feb 2026 23:09:50 +0100 Subject: [PATCH] fix: refine FUNCTION_CALL regex for better matching --- src/utils/parser/constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/parser/constants.mjs b/src/utils/parser/constants.mjs index 9684785c..bd18b2d2 100644 --- a/src/utils/parser/constants.mjs +++ b/src/utils/parser/constants.mjs @@ -32,7 +32,7 @@ export const DOC_MDN_BASE_URL_JS_GLOBALS = `${DOC_MDN_BASE_URL_JS}Reference/Glob // is a specific type of API Doc entry (e.g., Event, Class, Method, etc) // and to extract the inner content of said Heading to be used as the API doc entry name const CAMEL_CASE = '\\w+(?:\\.\\w+)*'; -const FUNCTION_CALL = '\\([^)]*\\)'; +const FUNCTION_CALL = '\\((?:[a-zA-Z$_][^)]*)?\\)'; // Matches "bar": // Group 1: foo[bar]