mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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: https://github.com/nodejs/node/pull/33998 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jamie Davis <davisjam@vt.edu>
This commit is contained in:
1 parent
c0febb593c
commit
32bbdc45b8
1 file changed
+1
-3
+1
-3
@@ -456,8 +456,6 @@ const maybeAncestors = r`(?:${id}\.?)*`;
|
||||
|
||||
const callWithParams = r`\([^)]*\)`;
|
||||
|
||||
const noCallOrProp = '(?![.[(])';
|
||||
|
||||
const maybeExtends = `(?: +extends +${maybeAncestors}${classId})?`;
|
||||
|
||||
/* eslint-disable max-len */
|
||||
@@ -478,7 +476,7 @@ const headingExpressions = [
|
||||
`^${maybeBacktick}${maybeAncestors}(${id})${callWithParams}${maybeBacktick}$`, 'i') },
|
||||
|
||||
{ type: 'property', re: RegExp(
|
||||
`^${maybeClassPropertyPrefix}${maybeBacktick}${ancestors}(${id})${maybeBacktick}${noCallOrProp}$`, 'i') },
|
||||
`^${maybeClassPropertyPrefix}${maybeBacktick}${ancestors}(${id})${maybeBacktick}$`, 'i') },
|
||||
];
|
||||
/* eslint-enable max-len */
|
||||
|
||||
|
||||
Reference in new issue
Block a user