Commit 6d2dcf3c authored by mvogt's avatar mvogt

Merge branch 'mer-1595'

parents b457bc44 cab516b2
......@@ -240,8 +240,14 @@ QList<QStringList> extractSearchTerms(const QString &string)
const int position = it.next();
const QString word(lowered.mid(position, (it.peekNext() - position)).trimmed());
if (!word.isEmpty()) {
// Test all searches in lower case
rv.append(tokenize(word));
const bool apostrophe(word.length() == 1 && word.at(0) == QChar('\''));
if (apostrophe && !rv.isEmpty()) {
// Special case - a trailing apostrophe is not counted as a component of the
// previous word, although it is included in the word if there is a following character
rv.last().last().append(word);
} else {
rv.append(tokenize(word));
}
}
}
......
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