0001-change-highlight-regexp-boundaries-from-b-to-W.patch
src/qtui/qtuimessageprocessor.cpp | ||
---|---|---|
119 | 119 |
nickList.prepend(net->myNick()); |
120 | 120 |
} |
121 | 121 |
foreach(QString nickname, nickList) { |
122 |
QRegExp nickRegExp("\\b" + QRegExp::escape(nickname) + "(\\W|\\b|$)", // + "\\b", this does not seem to work for trailing ` -> upstream bug? |
|
123 |
_nicksCaseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); |
|
122 |
QRegExp nickRegExp("(^|\\W)" + QRegExp::escape(nickname) + "(\\W|$)", _nicksCaseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); |
|
124 | 123 |
if(nickRegExp.indexIn(msg.contents()) >= 0) { |
125 | 124 |
msg.setFlags(msg.flags() | Message::Highlight); |
126 | 125 |
return; |
... | ... | |
137 | 136 |
QRegExp rx(rule.name, rule.caseSensitive? Qt::CaseSensitive : Qt::CaseInsensitive); |
138 | 137 |
match = rx.exactMatch(msg.contents()); |
139 | 138 |
} else { |
140 |
QRegExp rx("\\b" + QRegExp::escape(rule.name) + "\\b", rule.caseSensitive? Qt::CaseSensitive : Qt::CaseInsensitive);
|
|
139 |
QRegExp rx("\\W" + QRegExp::escape(rule.name) + "\\W", rule.caseSensitive? Qt::CaseSensitive : Qt::CaseInsensitive);
|
|
141 | 140 |
match = (rx.indexIn(msg.contents()) >= 0); |
142 | 141 |
} |
143 | 142 |
if(match) { |
144 |
- |