From e6ebde3ac487ef1952dc7cfe656af8c5cc55154e Mon Sep 17 00:00:00 2001 From: XL <71209582+Onion-L@users.noreply.github.com> Date: Sun, 24 Nov 2024 18:29:11 +0800 Subject: [PATCH] fix: remove extra margins before tags (#3039) --- composables/content-parse.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composables/content-parse.ts b/composables/content-parse.ts index f9b02b65..0fd66364 100644 --- a/composables/content-parse.ts +++ b/composables/content-parse.ts @@ -90,6 +90,11 @@ export function parseMastodonHTML( inReplyToStatus, } = options + // remove newline before Tags + html = html.replace(/\n(<[^>]+>)/g, (_1, raw) => { + return raw + }) + if (markdown) { // Handle code blocks html = html