From 74363f85fa96f76c0ba83586a0d97af35bed4b4a Mon Sep 17 00:00:00 2001 From: elektrahesse Date: Wed, 15 Sep 2010 21:14:55 +0200 Subject: Added more punctuation support to both names autocomplete and names highlight in chat --- linden/indra/newview/llchatbar.cpp | 2 +- linden/indra/newview/llfloaterchat.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 2009905..c7391d9 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp @@ -236,7 +236,7 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) left_part = txt; } - std::string pattern_s = "(^|.*[\\.\\?!:;,\\*\\(\\s]+)([a-z0-9]+)$"; + std::string pattern_s = "(^|.*[_=&\\|\\<\\>#@\\[\\]\\-\\+\"',\\.\\?!:;\\*\\(\\)\\s]+)([a-z0-9]+)$"; boost::match_results what; boost::regex expression(pattern_s, boost::regex::icase); if (boost::regex_search(to_match, what, expression, boost::match_extra)) diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index b1c1356..f352926 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp @@ -456,7 +456,7 @@ void LLFloaterChat::updateSettings() BOOL LLFloaterChat::isOwnNameInText(const std::string &text_line) { std::string my_name = gSavedSettings.getString("FirstName"); - std::string pattern_s = "(^|.*[',\\.\\?!:;\\*\\(\\s]+)(" + my_name + ")([',\\.\\?!:;\\*\\)\\s]+.*|$)"; + std::string pattern_s = "(^|.*[_=&\\|\\<\\>#@\\[\\]\\-\\+\"',\\.\\?!:;\\*\\(\\)\\s]+)(" + my_name + ")([_=&\\|\\<\\>#@\\[\\]\\-\\+\"',\\.\\?!:;\\*\\(\\)\\s]+.*|$)"; boost::smatch what; boost::regex e1(pattern_s, boost::regex::icase); -- cgit v1.1