From 165453f07082d57b1c2672e094398aa3bce338dc Mon Sep 17 00:00:00 2001 From: j Date: Mon, 11 Dec 2017 21:45:35 +0100 Subject: [PATCH] fix slimdown bold --- shared/utils/text.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/utils/text.py b/shared/utils/text.py index d81e3b0..9beea30 100644 --- a/shared/utils/text.py +++ b/shared/utils/text.py @@ -65,14 +65,14 @@ def get_text_joined(list_, separator=DEFAULT_SEPARATOR, last_word=ugettext_lazy( def slimdown(text): """ - Converts simplified markdown (*, **, _) to , und tags. + Converts simplified markdown (**, *, _) to , und tags. """ - i_pattern = re.compile(r"(\*)(.*?)\1") b_pattern = re.compile(r"(\*\*)(.*?)\1") + i_pattern = re.compile(r"(\*)(.*?)\1") u_pattern = re.compile(r"(__)(.*?)\1") - text, n = re.subn(i_pattern, "\\2", text) text, n = re.subn(b_pattern, "\\2", text) + text, n = re.subn(i_pattern, "\\2", text) text, n = re.subn(u_pattern, "\\2", text) return mark_safe(text)