From 67f58a33352f05a15c2107834d6cf69dec8d89ee Mon Sep 17 00:00:00 2001 From: Kerunix Date: Wed, 11 Jan 2023 21:55:47 +0100 Subject: [PATCH] fix: empty code blocks (#978) --- composables/masto/statusDrafts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composables/masto/statusDrafts.ts b/composables/masto/statusDrafts.ts index e9fac86d..2ac23d0d 100644 --- a/composables/masto/statusDrafts.ts +++ b/composables/masto/statusDrafts.ts @@ -83,7 +83,7 @@ export const isEmptyDraft = (draft: Draft | null | undefined) => { return true const { params, attachments } = draft const status = params.status || '' - const text = htmlToText(status).trim().replace(/^(@\S+\s?)+/, '').trim() + const text = htmlToText(status).trim().replace(/^(@\S+\s?)+/, '').replaceAll(/```/g, '').trim() return (text.length === 0) && attachments.length === 0