Skip to content
Snippets Groups Projects
Commit d1835763 authored by Cam Saül's avatar Cam Saül
Browse files

Don't require spaces between operators & fields in expressions

parent fe32a06f
No related branches found
No related tags found
No related merge requests found
......@@ -134,6 +134,12 @@ function tokenizeExpression(expressionString) {
currentToken.value += c;
}
// Replace operators in expressionString making sure the operators have exactly one space before and after
VALID_OPERATORS.forEach(function(operator) {
let regex = new RegExp("\\s*[\\" + operator + "]\\s*");
expressionString = expressionString.replace(regex, ' ' + operator + ' ');
});
for (; i < expressionString.length; i++) {
let c = expressionString.charAt(i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment