Browse Source

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>
v4.x
Timothy Gu 9 years ago
committed by Myles Borins
parent
commit
8fd9e646ec
  1. 2
      tools/doc/json.js

2
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) {

Loading…
Cancel
Save