From 4c6c1ecb6dbdaf6f96c4c02bcf7a42ed14403eb7 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 25 Jul 2021 21:59:19 +0200 Subject: [PATCH] fd --- drama/routes/comments.py | 1 + seed.sql | 0 2 files changed, 1 insertion(+) create mode 100644 seed.sql diff --git a/drama/routes/comments.py b/drama/routes/comments.py index 354306bbbd..5f47250743 100644 --- a/drama/routes/comments.py +++ b/drama/routes/comments.py @@ -278,6 +278,7 @@ def api_comment(v): if not body and not request.files.get('file'): return jsonify({"error":"You need to actually write something!"}), 400 for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', body, re.MULTILINE): body = body.replace(i.group(1), f'![]({i.group(1)})') + body = body.replace("\n", "\n\n") with CustomRenderer(post_id=parent_id) as renderer: body_md = renderer.render(mistletoe.Document(body)) body_html = sanitize(body_md, linkgen=True) diff --git a/seed.sql b/seed.sql new file mode 100644 index 0000000000..e69de29bb2