index #hashtags as such

This commit is contained in:
Jean-Francois Dockes 2014-07-29 09:56:00 +02:00
parent efaa1fb3a3
commit 0be78cfe48

View File

@ -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') {