diff --git a/uberwriter/markup_regex.py b/uberwriter/markup_regex.py index 6cd5c73..dffecfc 100644 --- a/uberwriter/markup_regex.py +++ b/uberwriter/markup_regex.py @@ -1,11 +1,11 @@ import re ITALIC = re.compile( - r"(\*|_)(?P.*?\S.*?)\1") + r"(\*|_)[^\s*](?P.*?\S.*?)\1") BOLD = re.compile( - r"(\*\*|__)(?P.*?\S.*?)\1") + r"(\*\*|__)[^\s*](?P.*?\S.*?)\1") BOLD_ITALIC = re.compile( - r"((\*\*|__)([*_])|([*_])(\*\*|__))(?P.*?\S.*?)(?:\5\4|\3\2)") + r"((\*\*|__)([*_])|([*_])(\*\*|__))[^\s*](?P.*?\S.*?)(?:\5\4|\3\2)") STRIKETHROUGH = re.compile( r"~~(?P.*?\S.*?)~~") CODE = re.compile(