diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2017-04-24 17:39:40 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2017-04-24 21:10:02 +0200 |
commit | 362ee754e7d28c36f74b7feee03e529a380dd379 (patch) | |
tree | c17b49ce15a117956a61a8d7c763211af6396349 /aurweb | |
parent | 136171e509b78d89b095bc5599bc158acd1250e7 (diff) | |
download | aur-362ee754e7d28c36f74b7feee03e529a380dd379.tar.gz aur-362ee754e7d28c36f74b7feee03e529a380dd379.tar.xz |
Do not keep line breaks in comments
With the new Markdown support, text paragraphs are now properly
converted to HTML paragraphs, so we no longer need to keep line breaks.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'aurweb')
-rwxr-xr-x | aurweb/scripts/rendercomment.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aurweb/scripts/rendercomment.py b/aurweb/scripts/rendercomment.py index 659e18ad..c23ef8de 100755 --- a/aurweb/scripts/rendercomment.py +++ b/aurweb/scripts/rendercomment.py @@ -86,9 +86,9 @@ def main(): conn = aurweb.db.Connection() text, pkgbase = get_comment(conn, commentid) - html = markdown.markdown(text, extensions=['nl2br', LinkifyExtension(), + html = markdown.markdown(text, extensions=[LinkifyExtension(), GitCommitsExtension(pkgbase)]) - allowed_tags = bleach.sanitizer.ALLOWED_TAGS + ['p', 'br'] + allowed_tags = bleach.sanitizer.ALLOWED_TAGS + ['p'] html = bleach.clean(html, tags=allowed_tags) save_rendered_comment(conn, commentid, html) |