forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-07-25 21:59:19 +02:00
parent d428fa28e0
commit 4c6c1ecb6d
2 changed files with 1 additions and 0 deletions

View File

@ -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)

0
seed.sql 100644
View File