mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Fix Sieve QuotedString handling
This commit is contained in:
parent
257d9201f6
commit
61c2eefec1
13 changed files with 185 additions and 104 deletions
|
|
@ -169,6 +169,9 @@ export const parseScript = (script, name = 'script.sieve') => {
|
|||
}
|
||||
valid || error('Not after IF/ELSIF condition');
|
||||
}
|
||||
if ('allof' === value || 'anyof' === value) {
|
||||
// (command instanceof ConditionalCommand || command instanceof NotTest) || error('Test-list not in conditional');
|
||||
}
|
||||
new_command = new Commands[value]();
|
||||
} else {
|
||||
if (command && (
|
||||
|
|
@ -225,7 +228,8 @@ export const parseScript = (script, name = 'script.sieve') => {
|
|||
pushArg(GrammarMultiLine.fromString(value));
|
||||
break;
|
||||
case T_QUOTED_STRING:
|
||||
pushArg(new GrammarQuotedString(value.slice(1,-1)));
|
||||
try { value = JSON.parse(value); } catch(e) { console.error(e, value); }
|
||||
pushArg(new GrammarQuotedString(value));
|
||||
break;
|
||||
case T_NUMBER:
|
||||
pushArg(new GrammarNumber(value));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue