diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/parseTools.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 24c38296..743b9793 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -95,9 +95,9 @@ function toNiceIdentCarefully(ident) { // is true, then also allow () and spaces. function isNiceIdent(ident, loose) { if (loose) { - return /^[\w$_ ()]+$/.test(ident); + return /^\(?[\w$_]+[\w$_\d ]*\)?$/.test(ident); } else { - return /^[\w$_]+$/.test(ident); + return /^[\w$_]+[\w$_\d]*$/.test(ident); } } |