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
1 changed files with 2 additions and 2 deletions

View File

@ -1357,11 +1357,11 @@ class Interface:
links = r'\b' + prefix_pattern + r'\S*[\w\/\=]|'
#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*)
#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)'