summaryrefslogtreecommitdiffstats
path: root/client/lib
diff options
context:
space:
mode:
authorIgnatzHome <ignatz@maschath.de>2018-05-19 21:31:43 +0200
committerIgnatzHome <ignatz@maschath.de>2018-05-19 21:31:43 +0200
commit811ccf0f102ce4b82efa2136a387e4c9e6b94456 (patch)
tree619b431c4a944e679bf9c7c668ff4819e2817fe9 /client/lib
parent422424d21c2f286478e5ad3f104ce966301adda1 (diff)
downloadwekan-811ccf0f102ce4b82efa2136a387e4c9e6b94456.tar.gz
wekan-811ccf0f102ce4b82efa2136a387e4c9e6b94456.tar.bz2
wekan-811ccf0f102ce4b82efa2136a387e4c9e6b94456.zip
i was constructing the wrong and the whole time.. *sigh*
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/filter.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/lib/filter.js b/client/lib/filter.js
index bab04d48..854ff446 100644
--- a/client/lib/filter.js
+++ b/client/lib/filter.js
@@ -108,6 +108,7 @@ class AdvancedFilter {
const commands = [];
let current = '';
let string = false;
+ let wasString = false;
let ignore = false;
for (let i = 0; i < this._filter.length; i++)
{
@@ -120,6 +121,7 @@ class AdvancedFilter {
if (char === '\'')
{
string = !string;
+ if (string) wasString = true;
continue;
}
if (char === '\\')
@@ -129,7 +131,8 @@ class AdvancedFilter {
}
if (char === ' ' && !string)
{
- commands.push({'cmd':current, string});
+ commands.push({'cmd':current, 'string':wasString});
+ wasString = false;
current = '';
continue;
}
@@ -137,7 +140,7 @@ class AdvancedFilter {
}
if (current !== '')
{
- commands.push(current);
+ commands.push({'cmd':current, 'string':wasString});
}
return commands;
}