From 859ad845241023c8c943a9286e303a579068ea5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Silva?= Date: Sun, 23 Jun 2019 02:34:49 +0100 Subject: [PATCH] Improve handling of bold italic **_bolditalic_** and other mixed combinations now work. --- uberwriter/markup_regex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uberwriter/markup_regex.py b/uberwriter/markup_regex.py index 23a08bb..ace576e 100644 --- a/uberwriter/markup_regex.py +++ b/uberwriter/markup_regex.py @@ -5,7 +5,7 @@ ITALIC = re.compile( BOLD = re.compile( r"(\*\*|__)(?P.+?)\1") BOLD_ITALIC = re.compile( - r"(\*\*\*|___)(?P.+?)\1") + r"((\*\*|__)([*_])|([*_])(\*\*|__))(?P.+?)(?:\5\4|\3\2)") STRIKETHROUGH = re.compile( r"~~(?P.+?)~~") CODE = re.compile(