@fw-components/formula-editor 2.0.7-formula-editor.18 → 2.0.7-formula-editor.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,7 +15,7 @@ export class Parser {
|
|
|
15
15
|
this._recommender = new Recommender(this.variables, minSuggestionLen);
|
|
16
16
|
}
|
|
17
17
|
parseInput(formula, prevCurPos = null, recommendation = null) {
|
|
18
|
-
let tokens = formula.match(/'[^']*'|\d+|[A-Za-z_][A-Za-z0-9_]*|[
|
|
18
|
+
let tokens = formula.match(/'[^']*'|\d+|[A-Za-z_][A-Za-z0-9_]*|[-+(),*^/:?\s]/g);
|
|
19
19
|
// Stores the positions of opening parentheses. This allows us to
|
|
20
20
|
// show "Unclosed parenthesis error" for positions which are far behind
|
|
21
21
|
// our current token
|
|
@@ -201,7 +201,7 @@ export class Parser {
|
|
|
201
201
|
return null;
|
|
202
202
|
}
|
|
203
203
|
const tokens = formula
|
|
204
|
-
.match(/'[^']*'|\d+|[A-Za-z_][A-Za-z0-9_]*|[
|
|
204
|
+
.match(/'[^']*'|\d+|[A-Za-z_][A-Za-z0-9_]*|[-+(),*^/:?\s]/g)
|
|
205
205
|
?.filter((el) => !/\s+/.test(el) && el !== "");
|
|
206
206
|
// Handling the special case of unary `-` and `+`.
|
|
207
207
|
let previousToken = "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fw-components/formula-editor",
|
|
3
|
-
"version": "2.0.7-formula-editor.
|
|
3
|
+
"version": "2.0.7-formula-editor.19",
|
|
4
4
|
"description": "A WYSIWYG type formula editor",
|
|
5
5
|
"main": "dist/formula-editor/src/formula-builder.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"@types/big.js": "^6.1.6",
|
|
26
26
|
"es-dev-server": "^2.1.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "b0b4c9a7ae848527291eb32a834bbaadc8153a21"
|
|
29
29
|
}
|