Skip to content
Snippets Groups Projects
Commit 032627a9 authored by nkour's avatar nkour
Browse files

do not match (2.8) as 8) emoticon

parent 7636e43a
No related branches found
No related tags found
No related merge requests found
......@@ -1119,11 +1119,12 @@ def make_regexps(self):
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment