Skip to content

Commit 777ed82

Browse files
TimothyGurvagg
authored andcommitted
tools: fix detecting constructor for JSON doc
Regex previous was not detecting cases like AssertionError as a class name. PR-URL: #4966 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chris Dickinson <[email protected]>
1 parent 0384a43 commit 777ed82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/doc/json.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ var classMethExpr =
502502
/^class\s*method\s*:?[^\.]+\.([^ \.\(\)]+)\([^\)]*\)\s*?$/i;
503503
var methExpr =
504504
/^(?:method:?\s*)?(?:[^\.]+\.)?([^ \.\(\)]+)\([^\)]*\)\s*?$/i;
505-
var newExpr = /^new ([A-Z][a-z]+)\([^\)]*\)\s*?$/;
505+
var newExpr = /^new ([A-Z][a-zA-Z]+)\([^\)]*\)\s*?$/;
506506
var paramExpr = /\((.*)\);?$/;
507507

508508
function newSection(tok) {

0 commit comments

Comments
 (0)