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

Fix generate multi line comment

parent cae25af9
......@@ -223,9 +223,22 @@ QString AutoCreateScriptUtil::generateConditionComment(const QString &comment)
if (str.isEmpty()) {
strComment += QLatin1Char('\n');
} else {
strComment += QLatin1Char('#') + str + QLatin1Char('\n');
if (!strComment.isEmpty()) {
strComment += QLatin1Char('\n');
}
strComment += QStringLiteral(" #") + str;
}
}
}
return strComment;
}
QString AutoCreateScriptUtil::loadConditionComment(QString originalComment, const QString &comment)
{
if (originalComment.isEmpty()) {
originalComment = comment;
} else {
originalComment += QLatin1Char('\n') + comment;
}
return originalComment;
}
......@@ -45,6 +45,7 @@ QString protectSlash(QString str);
QString indentation();
AbstractRegexpEditorLineEdit *createRegexpEditorLineEdit(QWidget *parent = nullptr);
QString generateConditionComment(const QString &comment);
QString loadConditionComment(QString originalComment, const QString &comment);
}
}
#endif // AUTOCREATESCRIPTUTIL_H
require "spamtest";
require "relational";
require "environment";
require "envelope";
require "subaddress";
require "imap4flags";
require "variables";
require "mboxmetadata";
require "ihave";
#SCRIPTNAME: Script part 0
if allof (virustest :value "gt" :comparator "i;octet" "0" #condition1
, environment "" "" #condition2
, envelope :all :is "" # condition3
......@@ -5,10 +16,10 @@ if allof (virustest :value "gt" :comparator "i;octet" "0" #condition1
, false
, metadataexists "" "" # condition5
, ihave ""
, environment "" "" /* condition6
continue condition6
again
*/
, environment "" "" # condition6
# continue condition6
# again
)
{
}
}
\ No newline at end of file
......@@ -89,10 +89,6 @@ QString SieveConditionAddress::code(QWidget *w) const
const QLineEdit *edit = w->findChild<QLineEdit *>(QStringLiteral("editaddress"));
const QString addressStr = AutoCreateScriptUtil::createAddressList(edit->text().trimmed(), false);
QString strComment;
if (!comment().trimmed().isEmpty()) {
strComment = QLatin1Char('#') + comment();
}
return AutoCreateScriptUtil::negativeString(isNegative) + QStringLiteral("address %1 %2 %3 %4").arg(selectAddressPartStr, matchTypeStr, selectHeaderTypeStr, addressStr)
+ AutoCreateScriptUtil::generateConditionComment(comment());
}
......@@ -115,6 +111,7 @@ bool SieveConditionAddress::setParamWidgetValue(const QDomElement &element, QWid
int indexStr = 0;
QDomNode node = element.firstChild();
QStringList lstTagValue;
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -149,7 +146,7 @@ bool SieveConditionAddress::setParamWidgetValue(const QDomElement &element, QWid
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionAddress::setParamWidgetValue unknown tagName " << tagName;
......@@ -157,6 +154,9 @@ bool SieveConditionAddress::setParamWidgetValue(const QDomElement &element, QWid
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
if (lstTagValue.count() == 1) {
QString specificError;
SelectMatchTypeComboBox *selectMatchCombobox = w->findChild<SelectMatchTypeComboBox *>(QStringLiteral("matchtypecombobox"));
......
......@@ -72,7 +72,7 @@ QString SieveConditionBody::code(QWidget *w) const
QLineEdit *edit = w->findChild<QLineEdit *>(QStringLiteral("edit"));
const QString editValue = AutoCreateScriptUtil::createAddressList(edit->text().trimmed(), false);
return AutoCreateScriptUtil::negativeString(isNegative) + QStringLiteral("body %1 %2 %3").arg(bodyValue, matchValue, editValue)
+ AutoCreateScriptUtil::generateConditionComment(comment());;
+ AutoCreateScriptUtil::generateConditionComment(comment());
}
QStringList SieveConditionBody::needRequires(QWidget *) const
......@@ -105,6 +105,7 @@ bool SieveConditionBody::setParamWidgetValue(const QDomElement &element, QWidget
bool wasListElement = false;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -126,7 +127,7 @@ bool SieveConditionBody::setParamWidgetValue(const QDomElement &element, QWidget
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else if (tagName == QLatin1String("list")) {
strValue << AutoCreateScriptUtil::listValueToStr(e);
wasListElement = true;
......@@ -138,6 +139,9 @@ bool SieveConditionBody::setParamWidgetValue(const QDomElement &element, QWidget
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
if (strValue.count() == 1) {
SelectBodyTypeWidget *bodyType = w->findChild<SelectBodyTypeWidget *>(QStringLiteral("bodytype"));
......
......@@ -110,6 +110,7 @@ bool SieveConditionConvert::setParamWidgetValue(const QDomElement &element, QWid
{
int index = 0;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -132,7 +133,7 @@ bool SieveConditionConvert::setParamWidgetValue(const QDomElement &element, QWid
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << "SieveActionConvert::setParamWidgetValue unknown tag " << tagName;
......@@ -140,5 +141,9 @@ bool SieveConditionConvert::setParamWidgetValue(const QDomElement &element, QWid
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......@@ -94,6 +94,7 @@ bool SieveConditionCurrentDate::setParamWidgetValue(const QDomElement &element,
QString type;
QString value;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -114,7 +115,7 @@ bool SieveConditionCurrentDate::setParamWidgetValue(const QDomElement &element,
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << "SieveConditionCurrentDate::setParamWidgetValue unknown tag " << tagName;
......@@ -122,6 +123,10 @@ bool SieveConditionCurrentDate::setParamWidgetValue(const QDomElement &element,
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
SelectDateWidget *dateWidget = w->findChild<SelectDateWidget *>(QStringLiteral("datewidget"));
dateWidget->setCode(type, value);
return true;
......
......@@ -110,6 +110,7 @@ bool SieveConditionDate::setParamWidgetValue(const QDomElement &element, QWidget
QString value;
QString headerStr;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -132,7 +133,7 @@ bool SieveConditionDate::setParamWidgetValue(const QDomElement &element, QWidget
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << "SieveConditionDate::setParamWidgetValue unknown tag " << tagName;
......@@ -140,6 +141,10 @@ bool SieveConditionDate::setParamWidgetValue(const QDomElement &element, QWidget
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
SelectDateWidget *dateWidget = w->findChild<SelectDateWidget *>(QStringLiteral("datewidget"));
dateWidget->setCode(type, value);
QLineEdit *header = w->findChild<QLineEdit *>(QStringLiteral("header"));
......
......@@ -122,6 +122,7 @@ bool SieveConditionEnvelope::setParamWidgetValue(const QDomElement &element, QWi
int indexTag = 0;
int indexStr = 0;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -169,7 +170,7 @@ bool SieveConditionEnvelope::setParamWidgetValue(const QDomElement &element, QWi
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionEnvelope::setParamWidgetValue unknown tagName " << tagName;
......@@ -177,6 +178,10 @@ bool SieveConditionEnvelope::setParamWidgetValue(const QDomElement &element, QWi
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -109,6 +109,7 @@ bool SieveConditionEnvironment::setParamWidgetValue(const QDomElement &element,
{
QDomNode node = element.firstChild();
int index = 0;
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -128,7 +129,7 @@ bool SieveConditionEnvironment::setParamWidgetValue(const QDomElement &element,
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveActionSetVariable::setParamWidgetValue unknown tagName " << tagName;
......@@ -136,6 +137,10 @@ bool SieveConditionEnvironment::setParamWidgetValue(const QDomElement &element,
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -78,6 +78,7 @@ QString SieveConditionExists::help() const
bool SieveConditionExists::setParamWidgetValue(const QDomElement &element, QWidget *w, bool notCondition, QString &error)
{
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -95,7 +96,7 @@ bool SieveConditionExists::setParamWidgetValue(const QDomElement &element, QWidg
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionExists::setParamWidgetValue unknown tagName " << tagName;
......@@ -103,6 +104,10 @@ bool SieveConditionExists::setParamWidgetValue(const QDomElement &element, QWidg
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -139,6 +139,7 @@ bool SieveConditionHasFlag::setParamWidgetValue(const QDomElement &element, QWid
{
QStringList strList;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -151,7 +152,7 @@ bool SieveConditionHasFlag::setParamWidgetValue(const QDomElement &element, QWid
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionExists::setParamWidgetValue unknown tagName " << tagName;
......@@ -159,6 +160,10 @@ bool SieveConditionHasFlag::setParamWidgetValue(const QDomElement &element, QWid
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
switch (strList.count()) {
case 1:
{
......
......@@ -92,6 +92,7 @@ bool SieveConditionHeader::setParamWidgetValue(const QDomElement &element, QWidg
{
int index = 0;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -129,7 +130,7 @@ bool SieveConditionHeader::setParamWidgetValue(const QDomElement &element, QWidg
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionHeader::setParamWidgetValue unknown tagName " << tagName;
......@@ -137,5 +138,9 @@ bool SieveConditionHeader::setParamWidgetValue(const QDomElement &element, QWidg
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......@@ -82,6 +82,7 @@ QString SieveConditionIhave::help() const
bool SieveConditionIhave::setParamWidgetValue(const QDomElement &element, QWidget *w, bool, QString &error)
{
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -93,7 +94,7 @@ bool SieveConditionIhave::setParamWidgetValue(const QDomElement &element, QWidge
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionIhave::setParamWidgetValue unknown tagName " << tagName;
......@@ -101,6 +102,9 @@ bool SieveConditionIhave::setParamWidgetValue(const QDomElement &element, QWidge
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -80,6 +80,7 @@ QString SieveConditionMailboxExists::help() const
bool SieveConditionMailboxExists::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/, QString &error)
{
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -91,7 +92,7 @@ bool SieveConditionMailboxExists::setParamWidgetValue(const QDomElement &element
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionMailboxExists::setParamWidgetValue unknown tagName " << tagName;
......@@ -99,6 +100,9 @@ bool SieveConditionMailboxExists::setParamWidgetValue(const QDomElement &element
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -128,6 +128,7 @@ bool SieveConditionMetaData::setParamWidgetValue(const QDomElement &element, QWi
{
int index = 0;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -165,7 +166,7 @@ bool SieveConditionMetaData::setParamWidgetValue(const QDomElement &element, QWi
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionMetaData::setParamWidgetValue unknown tagName " << tagName;
......@@ -173,6 +174,10 @@ bool SieveConditionMetaData::setParamWidgetValue(const QDomElement &element, QWi
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -93,6 +93,7 @@ bool SieveConditionMetaDataExists::setParamWidgetValue(const QDomElement &elemen
{
int index = 0;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -113,7 +114,7 @@ bool SieveConditionMetaDataExists::setParamWidgetValue(const QDomElement &elemen
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionServerMetaDataExists::setParamWidgetValue unknown tagName " << tagName;
......@@ -121,6 +122,10 @@ bool SieveConditionMetaDataExists::setParamWidgetValue(const QDomElement &elemen
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -129,6 +129,7 @@ bool SieveConditionServerMetaData::setParamWidgetValue(const QDomElement &elemen
{
int index = 0;
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -166,7 +167,7 @@ bool SieveConditionServerMetaData::setParamWidgetValue(const QDomElement &elemen
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionServerMetaData::setParamWidgetValue unknown tagName " << tagName;
......@@ -174,6 +175,10 @@ bool SieveConditionServerMetaData::setParamWidgetValue(const QDomElement &elemen
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -81,6 +81,7 @@ QString SieveConditionServerMetaDataExists::help() const
bool SieveConditionServerMetaDataExists::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/, QString &error)
{
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -92,7 +93,7 @@ bool SieveConditionServerMetaDataExists::setParamWidgetValue(const QDomElement &
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionServerMetaDataExists::setParamWidgetValue unknown tagName " << tagName;
......@@ -100,6 +101,10 @@ bool SieveConditionServerMetaDataExists::setParamWidgetValue(const QDomElement &
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -72,6 +72,7 @@ QString SieveConditionSize::help() const
bool SieveConditionSize::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/, QString &error)
{
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -94,7 +95,7 @@ bool SieveConditionSize::setParamWidgetValue(const QDomElement &element, QWidget
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionSize::setParamWidgetValue unknown tagName " << tagName;
......@@ -102,6 +103,10 @@ bool SieveConditionSize::setParamWidgetValue(const QDomElement &element, QWidget
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -125,6 +125,7 @@ QString SieveConditionSpamTest::help() const
bool SieveConditionSpamTest::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/, QString &error)
{
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -171,7 +172,7 @@ bool SieveConditionSpamTest::setParamWidgetValue(const QDomElement &element, QWi
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveSpamTest::setParamWidgetValue unknown tagName " << tagName;
......@@ -179,6 +180,10 @@ bool SieveConditionSpamTest::setParamWidgetValue(const QDomElement &element, QWi
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......
......@@ -106,6 +106,7 @@ QString SieveConditionVirusTest::help() const
bool SieveConditionVirusTest::setParamWidgetValue(const QDomElement &element, QWidget *w, bool /*notCondition*/, QString &error)
{
QDomNode node = element.firstChild();
QString commentStr;
while (!node.isNull()) {
QDomElement e = node.toElement();
if (!e.isNull()) {
......@@ -144,7 +145,7 @@ bool SieveConditionVirusTest::setParamWidgetValue(const QDomElement &element, QW
} else if (tagName == QLatin1String("crlf")) {
//nothing
} else if (tagName == QLatin1String("comment")) {
setComment(e.text());
commentStr = AutoCreateScriptUtil::loadConditionComment(commentStr, e.text());
} else {
unknownTag(tagName, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionVirusTest::setParamWidgetValue unknown tagName " << tagName;
......@@ -152,6 +153,10 @@ bool SieveConditionVirusTest::setParamWidgetValue(const QDomElement &element, QW
}
node = node.nextSibling();
}
if (!commentStr.isEmpty()) {
setComment(commentStr);
}
return true;
}
......