From 9a4e11f6f725df6bc64645f76c13c4cc294cf818 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 21 Mar 2016 22:11:31 -0700 Subject: [PATCH] Add `chars` param fix to `postprocess`. [ci skip] --- lib/main/build-doc.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/main/build-doc.js b/lib/main/build-doc.js index e4057260e..97569549c 100644 --- a/lib/main/build-doc.js +++ b/lib/main/build-doc.js @@ -33,8 +33,13 @@ var config = { }; function postprocess(string) { - // Fix docdown bug by wrapping symbol property identifiers in brackets. - return string.replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]'); + // Fix docdown bugs. + return string + // Repair the default value of `chars`. + // See https://github.com/eslint/doctrine/issues/157 for more details. + .replace(/\bchars=''/g, "chars=' '") + // Wrap symbol property identifiers in brackets. + .replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]'); } /*----------------------------------------------------------------------------*/