Skip to content

Commit 5dca04e

Browse files
Trottcodebytere
authored andcommitted
tools: remove superfluous regex in tools/doc/json.js
Remove noCallOrProp from tools/doc/json.js. It is a negative lookahead that is only used in one regex where it is placed immediately before a terminating $, thus rendering it meaningless. PR-URL: #33998 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jamie Davis <[email protected]>
1 parent ec07e61 commit 5dca04e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tools/doc/json.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,6 @@ const maybeAncestors = r`(?:${id}\.?)*`;
456456

457457
const callWithParams = r`\([^)]*\)`;
458458

459-
const noCallOrProp = '(?![.[(])';
460-
461459
const maybeExtends = `(?: +extends +${maybeAncestors}${classId})?`;
462460

463461
/* eslint-disable max-len */
@@ -478,7 +476,7 @@ const headingExpressions = [
478476
`^${maybeBacktick}${maybeAncestors}(${id})${callWithParams}${maybeBacktick}$`, 'i') },
479477

480478
{ type: 'property', re: RegExp(
481-
`^${maybeClassPropertyPrefix}${maybeBacktick}${ancestors}(${id})${maybeBacktick}${noCallOrProp}$`, 'i') },
479+
`^${maybeClassPropertyPrefix}${maybeBacktick}${ancestors}(${id})${maybeBacktick}$`, 'i') },
482480
];
483481
/* eslint-enable max-len */
484482

0 commit comments

Comments
 (0)