0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

tools: fix detecting constructor for JSON doc

Regex previous was not detecting cases like AssertionError as
a class name.

PR-URL: https://github.com/nodejs/node/pull/4966
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
This commit is contained in:
Timothy Gu 2016-01-29 21:11:49 -08:00 committed by James M Snell
parent 59fb26c9a0
commit aeb2eb7783

View File

@ -502,7 +502,7 @@ var classMethExpr =
/^class\s*method\s*:?[^\.]+\.([^ \.\(\)]+)\([^\)]*\)\s*?$/i;
var methExpr =
/^(?:method:?\s*)?(?:[^\.]+\.)?([^ \.\(\)]+)\([^\)]*\)\s*?$/i;
var newExpr = /^new ([A-Z][a-z]+)\([^\)]*\)\s*?$/;
var newExpr = /^new ([A-Z][a-zA-Z]+)\([^\)]*\)\s*?$/;
var paramExpr = /\((.*)\);?$/;
function newSection(tok) {