Generic highlighter fix: Re-setting the length in string detect rule after captures replacement.

Case 1 from tst_HighlighterEngine::testDynamicContexts covers this case.
This commit is contained in:
Leandro Melo
2010-06-14 14:00:44 +02:00
parent 5f342df123
commit 24be4b878f

View File

@@ -144,7 +144,10 @@ void StringDetectRule::setInsensitive(const QString &insensitive)
{ m_caseSensitivity = toCaseSensitivity(!toBool(insensitive)); }
void StringDetectRule::doReplaceExpressions(const QStringList &captures)
{ replaceByCaptures(&m_string, captures); }
{
replaceByCaptures(&m_string, captures);
m_length = m_string.length();
}
bool StringDetectRule::doMatchSucceed(const QString &text,
const int length,