From dec712b43ec4115a28754a18a716ba38e0932a61 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 29 Dec 2019 08:38:16 +0100 Subject: [PATCH] Add - und \u\u200b (zero width space) as word delimiters. --- src/document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/document.cpp b/src/document.cpp index 997d9d9..038e134 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -244,8 +244,8 @@ string Document::add_hashtags(const string &text) string out{text}; for (const auto &tag : _watchwords) { - regex re_tag("([[:space:][:punct:]]|^)(" - + tag + ")([[:space:][:punct:]]|$)", regex::icase); + regex re_tag("([[:space:][:punct:]-\u200b]|^)(" + + tag + ")([[:space:][:punct:]-\u200b]|$)", regex::icase); out = regex_replace(out, re_tag, "$1#$2$3", boost::format_first_only); }