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)