Graphite query lexer change, can now handle regex parameters for aliasSub function (Fixes #126)

This commit is contained in:
Torkel Ödegaard 2014-06-16 08:14:34 +02:00
parent da451d013a
commit 011e95b331
2 changed files with 1 additions and 56 deletions

View File

@ -28,6 +28,7 @@
Use datasources config instead. panel_names removed from config.js. Use plugins.panels to add custom panels
#### Fixes
- Graphite query lexer change, can now handle regex parameters for aliasSub function (Fixes #126)
- Filter option loading when having muliple nested filters now works better.
Options are now reloaded correctly and there are no multiple renders/refresh inbetween (#447),
After an option is changed and a nested template param is also reloaded, if the current value

View File

@ -646,62 +646,6 @@ define([
var jump = 1; // A length of a jump, after we're done
// parsing this character.
// Special treatment for some escaped characters.
if (char === "\\") {
this.skip();
char = this.peek();
switch (char) {
case "'":
break;
case "b":
char = "\b";
break;
case "f":
char = "\f";
break;
case "n":
char = "\n";
break;
case "r":
char = "\r";
break;
case "t":
char = "\t";
break;
case "0":
char = "\0";
break;
case "u":
char = String.fromCharCode(parseInt(this.input.substr(1, 4), 16));
jump = 5;
break;
case "v":
char = "\v";
break;
case "x":
var x = parseInt(this.input.substr(1, 2), 16);
char = String.fromCharCode(x);
jump = 3;
break;
case "\\":
case "\"":
case "/":
break;
case "":
char = "";
break;
case "!":
if (value.slice(value.length - 2) === "<") {
break;
}
/*falls through */
default:
// Weird escaping.
}
}
value += char;
this.skip(jump);
}