mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-09 14:28:22 +00:00
Merge pull request #198 from erqan/hashtag-fix
added ' and ; to hashtag delimiters
This commit is contained in:
commit
a94526db24
@ -1230,7 +1230,7 @@ void updateSeenHashtags(std::string &message, int64_t msgTime)
|
||||
// split and look for hashtags
|
||||
vector<string> tokens;
|
||||
set<string> hashtags;
|
||||
boost::algorithm::split(tokens,message,boost::algorithm::is_any_of(" \n\t.,:/?!"),
|
||||
boost::algorithm::split(tokens,message,boost::algorithm::is_any_of(" \n\t.,:/?!;'\"()[]{}*"),
|
||||
boost::algorithm::token_compress_on);
|
||||
BOOST_FOREACH(string const& token, tokens) {
|
||||
if( token.length() >= 2 ) {
|
||||
@ -1497,7 +1497,7 @@ Value newpostmsg(const Array& params, bool fHelp)
|
||||
|
||||
// split and look for mentions and hashtags
|
||||
vector<string> tokens;
|
||||
boost::algorithm::split(tokens,strMsg,boost::algorithm::is_any_of(" \n\t.,:/?!"),
|
||||
boost::algorithm::split(tokens,strMsg,boost::algorithm::is_any_of(" \n\t.,:/?!;'\"()[]{}*"),
|
||||
boost::algorithm::token_compress_on);
|
||||
BOOST_FOREACH(string const& token, tokens) {
|
||||
if( token.length() >= 2 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user