From ce1cf59cfaec1efde81b17f355b6ec1fabe83799 Mon Sep 17 00:00:00 2001 From: Roman Dvornov Date: Mon, 20 May 2024 02:03:52 +0200 Subject: [PATCH] Fix methods matching in changelog --- docs/discovery/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/discovery/data.js b/docs/discovery/data.js index d600fd1..48ce96d 100644 --- a/docs/discovery/data.js +++ b/docs/discovery/data.js @@ -131,7 +131,7 @@ function processChangelog(changelog, methods) { if (token.type === 'list') { for (let item of token.items) { const [typeOfChange] = item.text.match(/^\S+/); - const prelude = item.text.split(/;|\b\.\B/)[0].replace(/\((?:`[^`]+`|[^)])*\)\s*/g, m => m.trim().length === 2 ? '()' : ''); + const prelude = item.text.split(/;|\b\.\B/)[0].replace(/\B\((?:`[^`]+`|[^)])*\)\s*/g, m => m.trim().length === 2 ? '()' : ''); const methodRefs = prelude.match(/`[a-z\d]+\([^\)]*?\)`(?=(?:\s*(?:and|,)\s*`[a-z\d]+\([^\)]*?\)`)*\s*method)/ig) || prelude.match(/(?<=methods?\s*(?::\s*)?(?:`[a-z\d]+\([^\)]*?\)`\s*(?:and|,)\s*)*)`[a-z\d]+\([^\)]*?\)`/ig);