Commit fd880a7a authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Support fenced code in package comments

Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <>
parent 362ee754
......@@ -86,9 +86,10 @@ def main():
conn = aurweb.db.Connection()
text, pkgbase = get_comment(conn, commentid)
html = markdown.markdown(text, extensions=[LinkifyExtension(),
html = markdown.markdown(text, extensions=['fenced_code',
allowed_tags = bleach.sanitizer.ALLOWED_TAGS + ['p']
allowed_tags = bleach.sanitizer.ALLOWED_TAGS + ['p', 'pre']
html = bleach.clean(html, tags=allowed_tags)
save_rendered_comment(conn, commentid, html)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment