This commit is contained in:
parent
7e0278b542
commit
dcc07fab75
|
@ -244,8 +244,8 @@ string Document::add_hashtags(const string &text)
|
||||||
string out{text};
|
string out{text};
|
||||||
for (const auto &tag : _watchwords)
|
for (const auto &tag : _watchwords)
|
||||||
{
|
{
|
||||||
regex re_tag("([[:space:][:punct:]-\u200b]|^)("
|
regex re_tag("([[:space:]\u200b]|^)("
|
||||||
+ tag + ")([[:space:][:punct:]-\u200b]|$)", regex::icase);
|
+ tag + ")([[:space:]\u200b[:punct:]]|$)", regex::icase);
|
||||||
out = regex_replace(out, re_tag, "$1#$2$3", boost::format_first_only);
|
out = regex_replace(out, re_tag, "$1#$2$3", boost::format_first_only);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user