Mentions légales du service

Skip to content
Snippets Groups Projects
Commit fb25083c authored by Brett Zamir's avatar Brett Zamir
Browse files

Name unused whole match var. in same way as other regex

parent 4b3cb09e
Branches
No related tags found
No related merge requests found
...@@ -81,7 +81,7 @@ JSONPath.prototype._normalize = function (expr) { ...@@ -81,7 +81,7 @@ JSONPath.prototype._normalize = function (expr) {
var subx = []; var subx = [];
var normalized = expr.replace(/[\['](\??\(.*?\))[\]']/g, function ($0, $1) {return '[#' + (subx.push($1) - 1) + ']';}) var normalized = expr.replace(/[\['](\??\(.*?\))[\]']/g, function ($0, $1) {return '[#' + (subx.push($1) - 1) + ']';})
.replace(/'?\.'?|\['?/g, ';') .replace(/'?\.'?|\['?/g, ';')
.replace(/(?:;)?(\^+)(?:;)?/g, function (_, ups) {return ';' + ups.split('').join(';') + ';';}) .replace(/(?:;)?(\^+)(?:;)?/g, function ($0, ups) {return ';' + ups.split('').join(';') + ';';})
.replace(/;;;|;;/g, ';..;') .replace(/;;;|;;/g, ';..;')
.replace(/;$|'?\]|'$/g, ''); .replace(/;$|'?\]|'$/g, '');
var exprList = normalized.split(';').map(function (expr) { var exprList = normalized.split(';').map(function (expr) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment