diff --git a/src/ui/util/conf/ruletextparser.cpp b/src/ui/util/conf/ruletextparser.cpp index 0bca7405..8248bfe5 100644 --- a/src/ui/util/conf/ruletextparser.cpp +++ b/src/ui/util/conf/ruletextparser.cpp @@ -149,17 +149,11 @@ bool RuleTextParser::parseLineSection() bool RuleTextParser::processSectionChar() { + if ((m_charType & (CharListBegin | CharBracketBegin | CharDigit | CharValueBegin)) != 0) { + return processSectionBlock(); + } + switch (m_charType) { - case CharListBegin: { - processSectionLines(); - } break; - case CharBracketBegin: { - parseBracketValues(); - } break; - case CharDigit: - case CharValueBegin: { - parseValue(); - } break; case CharLetter: { return parseName(); } break; @@ -179,6 +173,24 @@ bool RuleTextParser::processSectionChar() return false; } +bool RuleTextParser::processSectionBlock() +{ + switch (m_charType) { + case CharListBegin: { + processSectionLines(); + } break; + case CharBracketBegin: { + parseBracketValues(); + } break; + case CharDigit: + case CharValueBegin: { + parseValue(); + } break; + } + + return false; +} + void RuleTextParser::processSectionLines() { parseLines(); diff --git a/src/ui/util/conf/ruletextparser.h b/src/ui/util/conf/ruletextparser.h index a1107d8c..96fd980a 100644 --- a/src/ui/util/conf/ruletextparser.h +++ b/src/ui/util/conf/ruletextparser.h @@ -74,6 +74,7 @@ private: bool parseLine(); bool parseLineSection(); bool processSectionChar(); + bool processSectionBlock(); void processSectionLines(); bool parseName();