Add chars param fix to postprocess. [ci skip]

This commit is contained in:
John-David Dalton
2016-03-21 22:11:31 -07:00
parent 24cef1a919
commit 9a4e11f6f7

View File

@@ -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]');
}
/*----------------------------------------------------------------------------*/