index #hashtags as such
This commit is contained in:
parent
efaa1fb3a3
commit
0be78cfe48
@ -656,7 +656,13 @@ bool TextSplit::text_to_words(const string &in)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '#':
|
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) {
|
if (m_wordLen > 0) {
|
||||||
int w = whatcc(it[it.getCpos()+1]);
|
int w = whatcc(it[it.getCpos()+1]);
|
||||||
if (w == SPACE || w == '\n' || w == '\r') {
|
if (w == SPACE || w == '\n' || w == '\r') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user