mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Added the new Sieve parser as script validator
This commit is contained in:
parent
9bae77bfa1
commit
42813b90dd
3 changed files with 19 additions and 5 deletions
|
|
@ -168,7 +168,7 @@ export const parseScript = (script, name = 'script.sieve') => {
|
|||
error = message => {
|
||||
// throw new SyntaxError(message + ' at ' + regex.lastIndex + ' line ' + line, name, line)
|
||||
throw new SyntaxError(message + ' on line ' + line
|
||||
+ ' around: ' + script.substr(regex.lastIndex - 10, 20).replace(/\r\n/g, '\\r\\n'), name, line)
|
||||
+ ' around:\n\n' + script.substr(regex.lastIndex - 20, 30), name, line)
|
||||
},
|
||||
pushArg = arg => {
|
||||
command || error('Argument not part of command');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue