From 358d69d4ba9b4f54dd2ecd31c3b4ede964b3f39d Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 24 Jun 2016 13:29:05 +0200 Subject: pretty text regex: allow spaces --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app.py') diff --git a/app.py b/app.py index ce6b042..0beab92 100644 --- a/app.py +++ b/app.py @@ -26,8 +26,8 @@ class Markup(object): def prettify_text(self, text): html = re.sub('<[^<]+?>', '', text) - html = re.sub(r"/(\w+)/", '\\1', html) - html = re.sub(r"\*(\w+)\*", '\\1', html) + html = re.sub(r"/([\w ]+)/", '\\1', html) + html = re.sub(r"\*([\w ]+)\*", '\\1', html) html = re.sub(r"#(\w+)", '#\\1', html) html = html.replace("\n", "
") -- cgit v1.3.1