mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
i was constructing the wrong and the whole time.. *sigh*
This commit is contained in:
parent
422424d21c
commit
811ccf0f10
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue