From 08ae593de1cae144f28fcc0c12b8e6ad1a123860 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 13 Mar 2023 20:33:19 +0200 Subject: [PATCH] fix this https://stupidpol.site/post/154579/betting-badge-opportunity-are-you-a/3782163#context --- files/assets/js/markdown.js | 2 +- files/helpers/sanitize.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/assets/js/markdown.js b/files/assets/js/markdown.js index 01212be1a..de10f8943 100644 --- a/files/assets/js/markdown.js +++ b/files/assets/js/markdown.js @@ -94,7 +94,7 @@ function markdown(t) { } } - input = input.replace(compiled_regex, '$1\n\n![]($2)\n\n') + input = input.replace(compiled_regex, '$1![]($2)') input = marked(input) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index cf4da3ae1..e803e4b11 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -354,7 +354,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized) sanitized = greentext_regex.sub(r'\1\>\2', sanitized) - sanitized = image_regex.sub(r'\1\n\n![](\2)\n\n', sanitized) + sanitized = image_regex.sub(r'\1![](\2)', sanitized) sanitized = image_check_regex.sub(r'\1', sanitized) sanitized = link_fix_regex.sub(r'\1https://\2', sanitized)