|
a/src/common/textsplit.cpp |
|
b/src/common/textsplit.cpp |
|
... |
|
... |
654 |
m_wordStart += it.appendchartostring(m_span);
|
654 |
m_wordStart += it.appendchartostring(m_span);
|
655 |
}
|
655 |
}
|
656 |
break;
|
656 |
break;
|
657 |
|
657 |
|
658 |
case '#':
|
658 |
case '#':
|
659 |
// Keep it only at end of word ... Special case for c# you see...
|
659 |
// Keep it only at the beginning of a word (hashtag),
|
|
|
660 |
if (m_wordLen == 0) {
|
|
|
661 |
m_wordLen += it.appendchartostring(m_span);
|
|
|
662 |
STATS_INC_WORDCHARS;
|
|
|
663 |
break;
|
|
|
664 |
}
|
|
|
665 |
// or at the end (special case for c# ...)
|
660 |
if (m_wordLen > 0) {
|
666 |
if (m_wordLen > 0) {
|
661 |
int w = whatcc(it[it.getCpos()+1]);
|
667 |
int w = whatcc(it[it.getCpos()+1]);
|
662 |
if (w == SPACE || w == '\n' || w == '\r') {
|
668 |
if (w == SPACE || w == '\n' || w == '\r') {
|
663 |
m_wordLen += it.appendchartostring(m_span);
|
669 |
m_wordLen += it.appendchartostring(m_span);
|
664 |
STATS_INC_WORDCHARS;
|
670 |
STATS_INC_WORDCHARS;
|