Commit b4a4c2e9 authored by Laurent Montel's avatar Laurent Montel 😁

Fix generated file

parent 737e85ae
......@@ -2,3 +2,4 @@ require "editheader";
#SCRIPTNAME: Script part 0
addheader "X-Sieve-Filtered" "kim@job.example.com";
......@@ -13,4 +13,4 @@ if allof (header :contains "From" "mailer-daemon@foo.de"
fileinto "folder";
addflag [ "\\seen" ];
stop;
}
\ No newline at end of file
}
......@@ -25,4 +25,4 @@ rejected
} else {
keep :flags [ "\\Answered" ];
}
\ No newline at end of file
}
......@@ -4,4 +4,4 @@ require "variables";
#SCRIPTNAME: test1
if hasflag :is "foo"
{
}
\ No newline at end of file
}
......@@ -21,4 +21,4 @@ if virustest :value "gt" :comparator "i;ascii-numeric" "5"
.
;
}
\ No newline at end of file
}
......@@ -2,3 +2,4 @@ require "enotify";
#SCRIPTNAME: Script part 0
notify :importance "1" :message "You got mail" "xmpp:tim@example.com?message;subject=SIEVE";
......@@ -3,3 +3,4 @@ require "editheader";
#SCRIPTNAME: Script part 0
# " create a problem during parsing
addheader "X-Sieve-Filtered" "<kim@job.example.com>";
......@@ -3,7 +3,6 @@ if false # allof(not header :contains "X-Spam-Flag" "YES")
{
}
#SCRIPTNAME: Script part 1
if true # allof(not header :contains "X-Spam-Flag" "YES")
{
......
......@@ -22,4 +22,4 @@ if currentdate :matches "month" "*"
if header :is "list-id" "dovecot.dovecot.org"
{
fileinto :create "INBOX.Lists.${year}.${month}.dovecot";
}
\ No newline at end of file
}
......@@ -20,3 +20,4 @@ if address :all :is "X-Delivered-To" "alias1@fastmail.fm"
#SCRIPTNAME: Script part 1
redirect "another@account.net";
......@@ -12,4 +12,4 @@ if envelope :user :is "to" "postmaster"
{
fileinto "inbox.postmaster";
stop;
}
\ No newline at end of file
}
......@@ -10,3 +10,4 @@ foreverypart :name "foreach1" {
stop;
}
}
......@@ -9,3 +9,4 @@ if header :is [ "X-DSPAM-Result", "X-DSPAM-Reclassified" ] [ "Spam", "Virus" ]
#SCRIPTNAME: Script part 1
redirect "user@domain.com";
......@@ -23,4 +23,4 @@ dsfgsdfgsdfg
if false
{
keep;
}
\ No newline at end of file
}
......@@ -20,4 +20,4 @@ dsfgsdfgsdfg
#SCRIPTNAME: Script part 2
if false
{
}
\ No newline at end of file
}
......@@ -363,6 +363,7 @@ QString SieveScriptListBox::generatedScript(QString &requires) const
resultScript += QLatin1Char('#') + defaultScriptName() + item->text() + QLatin1Char('\n');
resultScript += item->generatedScript(lstRequires);
}
resultScript += QLatin1Char('\n');
QStringList endRequires;
for (const QString &r : qAsConst(lstRequires)) {
......
......@@ -153,8 +153,6 @@ void SieveScriptPage::generatedScript(QString &script, QStringList &requires)
}
if (inForEveryPartLoop) {
script += QStringLiteral("\n}\n");
} else {
script += QLatin1Char('\n');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment