diff --git a/core/modules/parsers/wikiparser/rules/functiondef.js b/core/modules/parsers/wikiparser/rules/functiondef.js index 9e748ef48..1320cc004 100644 --- a/core/modules/parsers/wikiparser/rules/functiondef.js +++ b/core/modules/parsers/wikiparser/rules/functiondef.js @@ -40,7 +40,7 @@ exports.parse = function() { var paramString = this.match[3], params = []; if(this.match[2]) { - var reParam = /\s*([A-Za-z0-9\-_]+)(?:\s*:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|([^"'\s]+)))?/mg, + var reParam = /\s*([^:)\s]+)(?:\s*:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|([^"'\s]+)))?/mg, paramMatch = reParam.exec(paramString); while(paramMatch) { // Save the parameter details diff --git a/core/modules/parsers/wikiparser/rules/parameters.js b/core/modules/parsers/wikiparser/rules/parameters.js index 93001c8e5..567ac9b83 100644 --- a/core/modules/parsers/wikiparser/rules/parameters.js +++ b/core/modules/parsers/wikiparser/rules/parameters.js @@ -39,7 +39,7 @@ exports.parse = function() { var paramString = this.match[1], attributes = Object.create(null), orderedAttributes = [], - reParam = /\s*([A-Za-z0-9\-_]+)(?:\s*:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|([^"'\s]+)))?/mg, + reParam = /\s*([^:)\s]+)(?:\s*:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|([^"'\s]+)))?/mg, paramMatch = reParam.exec(paramString); while(paramMatch) { // Save the parameter details