mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
Solve some comparators
This commit is contained in:
parent
43c669e629
commit
55178016a0
3 changed files with 58 additions and 14 deletions
|
|
@ -35,10 +35,14 @@ class Body extends Grammar.Test
|
|||
this.match_type = arg;
|
||||
} else if (':raw' === arg || ':text' === arg) {
|
||||
this.body_transform = arg;
|
||||
} else if (':content' === arg) {
|
||||
// string-list
|
||||
} else if (arg instanceof Grammar.StringList || arg instanceof Grammar.StringType) {
|
||||
this[args[i+1] ? 'content_list' : 'key_list'] = arg;
|
||||
if (':comparator' === args[i-1]) {
|
||||
this.comparator = arg;
|
||||
} else if (':content' === args[i-1]) {
|
||||
this.body_transform = ':content ' + arg;
|
||||
} else {
|
||||
this[args[i+1] ? 'content_list' : 'key_list'] = arg;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,11 @@ class HasFlag extends Grammar.Test
|
|||
if (':is' === arg || ':contains' === arg || ':matches' === arg) {
|
||||
this.match_type = arg;
|
||||
} else if (arg instanceof Grammar.StringList || arg instanceof Grammar.StringType) {
|
||||
this[args[i+1] ? 'variable_list' : 'list_of_flags'] = arg;
|
||||
if (':comparator' === args[i-1]) {
|
||||
this.comparator = arg;
|
||||
} else {
|
||||
this[args[i+1] ? 'variable_list' : 'list_of_flags'] = arg;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue