summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-06-24 13:29:05 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-06-24 13:29:05 +0200
commit358d69d4ba9b4f54dd2ecd31c3b4ede964b3f39d (patch)
tree612873678c0c1fda58067243f1d648f4c6d30a4d /app.py
parentfd2be561b96d1c4ea59d038aa164e712d33ee7f1 (diff)
downloadjokevote-358d69d4ba9b4f54dd2ecd31c3b4ede964b3f39d.tar.gz
jokevote-358d69d4ba9b4f54dd2ecd31c3b4ede964b3f39d.zip
pretty text regex: allow spaces
Diffstat (limited to 'app.py')
-rw-r--r--app.py4
1 files changed, 2 insertions, 2 deletions
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+)/", '<em>\\1</em>', html)
- html = re.sub(r"\*(\w+)\*", '<strong>\\1</strong>', html)
+ html = re.sub(r"/([\w ]+)/", '<em>\\1</em>', html)
+ html = re.sub(r"\*([\w ]+)\*", '<strong>\\1</strong>', html)
html = re.sub(r"#(\w+)", '<a href="/?filter=' +
self.tagmark + '\\1">#\\1</a>', html)
html = html.replace("\n", "<br />")