summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/HighlightRule.cpp')
-rw-r--r--Swift/Controllers/HighlightRule.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Swift/Controllers/HighlightRule.cpp b/Swift/Controllers/HighlightRule.cpp
index 622fbad..cc20401 100644
--- a/Swift/Controllers/HighlightRule.cpp
+++ b/Swift/Controllers/HighlightRule.cpp
@@ -63,20 +63,20 @@ bool HighlightRule::isMatch(const std::string& body, const std::string& sender,
bool matchesKeyword = keywords_.empty() && (nick.empty() || !nickIsKeyword_);
bool matchesSender = senders_.empty();
- foreach (const boost::regex & rx, keywordRegex_) {
- if (boost::regex_search(body, rx)) {
- matchesKeyword = true;
- break;
- }
- }
-
/* keyword highlighting has now moved to ChatMessageParser.cpp */
- //if (!matchesKeyword && nickIsKeyword_ && !nick.empty()) {
- //if (boost::regex_search(body, regexFromString(nick))) {
+ //foreach (const boost::regex & rx, keywordRegex_) {
+ //if (boost::regex_search(body, rx)) {
//matchesKeyword = true;
+ //break;
//}
//}
+ if (!matchesKeyword && nickIsKeyword_ && !nick.empty()) {
+ if (boost::regex_search(body, regexFromString(nick))) {
+ matchesKeyword = true;
+ }
+ }
+
foreach (const boost::regex & rx, senderRegex_) {
if (boost::regex_search(sender, rx)) {
matchesSender = true;