From bf294e0009877216c85e62246d9315bb8936af2f Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 16 Dec 2014 03:50:42 +0000 Subject: [PATCH] Responsive images in markdown --- rophako/model/comment.py | 3 --- rophako/www/smoke/style.css | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rophako/model/comment.py b/rophako/model/comment.py index c1e2791..b811b67 100644 --- a/rophako/model/comment.py +++ b/rophako/model/comment.py @@ -181,9 +181,6 @@ def format_message(message): # Comments use Markdown formatting, and HTML tags are escaped by default. message = render_markdown(message) - # Don't allow commenters to use images. - message = re.sub(r'', '', message) - # Process emoticons. message = Emoticons.render(message) return message diff --git a/rophako/www/smoke/style.css b/rophako/www/smoke/style.css index 1930e5d..12ae1c6 100644 --- a/rophako/www/smoke/style.css +++ b/rophako/www/smoke/style.css @@ -77,6 +77,12 @@ pre, code { font-size: 10pt; } +/* Use responsive images in Markdown code. */ +.markdown img { + max-width: 100%; + height: auto; +} + /********************* * Classes used by core Rophako pages. You'll want to * implement these in your custom layout.