diff options
Diffstat (limited to 'node_modules/balanced-match/index.js')
| -rw-r--r-- | node_modules/balanced-match/index.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js index e8d85870..c67a6460 100644 --- a/node_modules/balanced-match/index.js +++ b/node_modules/balanced-match/index.js @@ -1,3 +1,4 @@ +'use strict'; module.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); @@ -27,6 +28,9 @@ function range(a, b, str) { var i = ai; if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } begs = []; left = str.length; |
