do not match (2.8) as 8) emoticon
This commit is contained in:
parent
7636e43a2d
commit
032627a96f
|
@ -1119,11 +1119,12 @@ class Interface:
|
|||
emoticons_pattern_prematch += emoticon_escaped + '|'
|
||||
emoticons_pattern_postmatch += emoticon_escaped + '|'
|
||||
# We match from our list of emoticons, but they must either have
|
||||
# whitespace, or another emoticon next to it to match successfully
|
||||
# whitespace, or another emoticon next to it to match successfully
|
||||
# [\w.] alphanumeric and dot (for not matching 8) in (2.8))
|
||||
emoticons_pattern = '|' + \
|
||||
'(?:(?<!\w' + emoticons_pattern_prematch[:-1] + '))' + \
|
||||
'(?:(?<![\w.]' + emoticons_pattern_prematch[:-1] + '))' + \
|
||||
'(?:' + emoticons_pattern[:-1] + ')' + \
|
||||
'(?:(?!\w' + emoticons_pattern_postmatch[:-1] + '))'
|
||||
'(?:(?![\w.]' + emoticons_pattern_postmatch[:-1] + '))'
|
||||
|
||||
# because emoticons match later (in the string) they need to be after
|
||||
# basic matches that may occur earlier
|
||||
|
|
Loading…
Reference in New Issue