瀏覽代碼

Responsive images in markdown

pull/2/head
Noah Petherbridge 5 年之前
父節點
當前提交
bf294e0009
共有 2 個檔案被更改,包括 6 行新增3 行删除
  1. +0
    -3
      rophako/model/comment.py
  2. +6
    -0
      rophako/www/smoke/style.css

+ 0
- 3
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'<img.+?/>', '', message)

# Process emoticons.
message = Emoticons.render(message)
return message


+ 6
- 0
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.


Loading…
取消
儲存