| 664 | | return True |
| | 664 | # get char after the word that highlight us |
| | 665 | char_position = len(special_word) |
| | 666 | refer_to_nick_char = \ |
| | 667 | word[char_position:char_position+1] |
| | 668 | if (refer_to_nick_char != ''): |
| | 669 | refer_to_nick_char_code = ord(refer_to_nick_char) |
| | 670 | if ((refer_to_nick_char_code < 65 or refer_to_nick_char_code > 123)\ |
| | 671 | or (refer_to_nick_char_code < 97 and refer_to_nick_char_code > 90)): |
| | 672 | return True |
| | 673 | else: |
| | 674 | # This is A->Z or a->z, we can be sure our nick is the beginning |
| | 675 | # of a real word, do not highlight. Note that we can probably |
| | 676 | # do a better detection of non-punctuation characters |
| | 677 | return False |
| | 678 | else: # Special word == word, no char after in word |
| | 679 | return True |