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

Don't create empty comment

parent cddc25b0
......@@ -94,7 +94,7 @@ void SieveActionWidget::generatedScript(QString &script, QStringList &requires,
}
}
QString comment = widgetAction->comment();
if (!comment.isEmpty()) {
if (!comment.trimmed().isEmpty()) {
script += (onlyActions ? QString() : indentation()) + QLatin1Char('#') + comment.replace(QLatin1Char('\n'), QStringLiteral("\n#")) + QLatin1Char('\n');
}
script += (onlyActions ? QString() : indentation()) + widgetAction->code(currentWidget) + 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