fix regex when ascii_formating is false

This commit is contained in:
Yann Leboulanger 2006-03-18 12:20:59 +00:00
parent 3b12da41a3
commit df395ab6ef

View file

@ -1357,11 +1357,11 @@ class Interface:
links = r'\b' + prefix_pattern + r'\S*[\w\/\=]|' links = r'\b' + prefix_pattern + r'\S*[\w\/\=]|'
#2nd one: at_least_one_char@at_least_one_char.at_least_one_char #2nd one: at_least_one_char@at_least_one_char.at_least_one_char
mail = r'\bmailto:\S*[^\s\W]|' r'\b\S+@\S+\.\S*[^\s\W]|' mail = r'\bmailto:\S*[^\s\W]|' r'\b\S+@\S+\.\S*[^\s\W]'
#detects eg. *b* *bold* *bold bold* test *bold* *bold*! (*bold*) #detects eg. *b* *bold* *bold bold* test *bold* *bold*! (*bold*)
#doesn't detect (it's a feature :P) * bold* *bold * * bold * test*bold* #doesn't detect (it's a feature :P) * bold* *bold * * bold * test*bold*
formatting = r'(?<!\w)' r'\*[^\s*]' r'([^*]*[^\s*])?' r'\*(?!\w)|'\ formatting = r'|(?<!\w)' r'\*[^\s*]' r'([^*]*[^\s*])?' r'\*(?!\w)|'\
r'(?<!\w|\<)' r'/[^\s/]' r'([^/]*[^\s/])?' r'/(?!\w)|'\ r'(?<!\w|\<)' r'/[^\s/]' r'([^/]*[^\s/])?' r'/(?!\w)|'\
r'(?<!\w)' r'_[^\s_]' r'([^_]*[^\s_])?' r'_(?!\w)' r'(?<!\w)' r'_[^\s_]' r'([^_]*[^\s_])?' r'_(?!\w)'