From 78b61396a1c3ae191f4fc0a409d5030c575bc323 Mon Sep 17 00:00:00 2001 From: Crozzers Date: Wed, 18 Oct 2023 18:32:07 +0100 Subject: [PATCH] Fix #493 persisting when `code-friendly` extra enabled due to regex oversight. Forgot to apply all the same changes to code friendly strong re that I did to regular strong re --- lib/markdown2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/markdown2.py b/lib/markdown2.py index 88b2bced..e7384fb1 100755 --- a/lib/markdown2.py +++ b/lib/markdown2.py @@ -2334,7 +2334,7 @@ def _do_tg_spoiler(self, text): _strong_re = re.compile(r"(\*\*|__)(?=\S)(.*\S)\1", re.S) _em_re = r"(\*|_)(?=\S)(.*?\S)\1" - _code_friendly_strong_re = re.compile(r"\*\*(?=\S)(.+?[*_]*)\*\*", re.S) + _code_friendly_strong_re = re.compile(r"\*\*(?=\S)(.*\S)\*\*", re.S) _code_friendly_em_re = r"\*(?=\S)(.+?)\*" def _do_italics_and_bold(self, text): if self.extras.get('middle-word-em', True) is False: