From 777ed821627482d58123d8526c5e2fb92c4078ba Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Fri, 29 Jan 2016 21:11:49 -0800 Subject: [PATCH] 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 Reviewed-By: Chris Dickinson --- tools/doc/json.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/doc/json.js b/tools/doc/json.js index 9f256e41e5d7d1..cadcabf5a1cd9f 100644 --- a/tools/doc/json.js +++ b/tools/doc/json.js @@ -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) {