From b13381281cead487cbdbfd6a69fb097ea5e456c3 Mon Sep 17 00:00:00 2001 From: "mengyuan.ymy" Date: Fri, 7 Apr 2017 10:32:55 +0800 Subject: [PATCH] fix bug in https://github.com/juliangruber/brace-expansion/issues/33 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 955f27c..0478be8 100644 --- a/index.js +++ b/index.js @@ -106,7 +106,7 @@ function expand(str, isTop) { var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = /^(.*,)+(.+)?$/.test(m.body); + var isOptions = m.body.indexOf(',') >= 0; if (!isSequence && !isOptions) { // {a},b} if (m.post.match(/,.*\}/)) {