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

Fix generated file

parent 737e85ae
...@@ -2,3 +2,4 @@ require "editheader"; ...@@ -2,3 +2,4 @@ require "editheader";
#SCRIPTNAME: Script part 0 #SCRIPTNAME: Script part 0
addheader "X-Sieve-Filtered" "kim@job.example.com"; addheader "X-Sieve-Filtered" "kim@job.example.com";
...@@ -2,3 +2,4 @@ require "enotify"; ...@@ -2,3 +2,4 @@ require "enotify";
#SCRIPTNAME: Script part 0 #SCRIPTNAME: Script part 0
notify :importance "1" :message "You got mail" "xmpp:tim@example.com?message;subject=SIEVE"; notify :importance "1" :message "You got mail" "xmpp:tim@example.com?message;subject=SIEVE";
...@@ -3,3 +3,4 @@ require "editheader"; ...@@ -3,3 +3,4 @@ require "editheader";
#SCRIPTNAME: Script part 0 #SCRIPTNAME: Script part 0
# " create a problem during parsing # " create a problem during parsing
addheader "X-Sieve-Filtered" "<kim@job.example.com>"; addheader "X-Sieve-Filtered" "<kim@job.example.com>";
...@@ -3,7 +3,6 @@ if false # allof(not header :contains "X-Spam-Flag" "YES") ...@@ -3,7 +3,6 @@ if false # allof(not header :contains "X-Spam-Flag" "YES")
{ {
} }
#SCRIPTNAME: Script part 1 #SCRIPTNAME: Script part 1
if true # allof(not header :contains "X-Spam-Flag" "YES") if true # allof(not header :contains "X-Spam-Flag" "YES")
{ {
......
...@@ -20,3 +20,4 @@ if address :all :is "X-Delivered-To" "alias1@fastmail.fm" ...@@ -20,3 +20,4 @@ if address :all :is "X-Delivered-To" "alias1@fastmail.fm"
#SCRIPTNAME: Script part 1 #SCRIPTNAME: Script part 1
redirect "another@account.net"; redirect "another@account.net";
...@@ -10,3 +10,4 @@ foreverypart :name "foreach1" { ...@@ -10,3 +10,4 @@ foreverypart :name "foreach1" {
stop; stop;
} }
} }
...@@ -33,3 +33,4 @@ Thanks. ...@@ -33,3 +33,4 @@ Thanks.
keep; keep;
} }
} }
...@@ -9,3 +9,4 @@ if header :is [ "X-DSPAM-Result", "X-DSPAM-Reclassified" ] [ "Spam", "Virus" ] ...@@ -9,3 +9,4 @@ if header :is [ "X-DSPAM-Result", "X-DSPAM-Reclassified" ] [ "Spam", "Virus" ]
#SCRIPTNAME: Script part 1 #SCRIPTNAME: Script part 1
redirect "user@domain.com"; redirect "user@domain.com";
...@@ -19,3 +19,4 @@ John Doe ...@@ -19,3 +19,4 @@ John Doe
. .
; ;
...@@ -363,6 +363,7 @@ QString SieveScriptListBox::generatedScript(QString &requires) const ...@@ -363,6 +363,7 @@ QString SieveScriptListBox::generatedScript(QString &requires) const
resultScript += QLatin1Char('#') + defaultScriptName() + item->text() + QLatin1Char('\n'); resultScript += QLatin1Char('#') + defaultScriptName() + item->text() + QLatin1Char('\n');
resultScript += item->generatedScript(lstRequires); resultScript += item->generatedScript(lstRequires);
} }
resultScript += QLatin1Char('\n');
QStringList endRequires; QStringList endRequires;
for (const QString &r : qAsConst(lstRequires)) { for (const QString &r : qAsConst(lstRequires)) {
......
...@@ -153,8 +153,6 @@ void SieveScriptPage::generatedScript(QString &script, QStringList &requires) ...@@ -153,8 +153,6 @@ void SieveScriptPage::generatedScript(QString &script, QStringList &requires)
} }
if (inForEveryPartLoop) { if (inForEveryPartLoop) {
script += QStringLiteral("\n}\n"); 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