From 0be78cfe481882da9292d793c087ee3cbce95287 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Tue, 29 Jul 2014 09:56:00 +0200 Subject: [PATCH] index #hashtags as such --- src/common/textsplit.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/textsplit.cpp b/src/common/textsplit.cpp index 83f5e828..8a677a64 100644 --- a/src/common/textsplit.cpp +++ b/src/common/textsplit.cpp @@ -656,7 +656,13 @@ bool TextSplit::text_to_words(const string &in) break; case '#': - // Keep it only at end of word ... Special case for c# you see... + // Keep it only at the beginning of a word (hashtag), + if (m_wordLen == 0) { + m_wordLen += it.appendchartostring(m_span); + STATS_INC_WORDCHARS; + break; + } + // or at the end (special case for c# ...) if (m_wordLen > 0) { int w = whatcc(it[it.getCpos()+1]); if (w == SPACE || w == '\n' || w == '\r') {