From abdafb0cae1e0c00f184abbadc692f4eaa98f451 Mon Sep 17 00:00:00 2001 From: jonschlinkert Date: Fri, 16 Feb 2018 16:09:36 -0500 Subject: [PATCH] optimize regex --- lib/parsers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parsers.js b/lib/parsers.js index 42730fe..b14bc83 100644 --- a/lib/parsers.js +++ b/lib/parsers.js @@ -127,7 +127,7 @@ module.exports = function(braces, options) { .set('multiplier', function() { var isInside = this.isInside('brace'); var pos = this.position(); - var m = this.match(/^\{(,+(?:(\{,+\})*),*|,*(?:(\{,+\})*),+)\}/); + var m = this.match(/^\{((?:,|\{,+\})+)\}/); if (!m) return; this.multiplier = true;