fix: empty code blocks (#978)

zio/stable
Kerunix 2023-01-11 21:55:47 +01:00 committed by GitHub
parent 689ae0c701
commit 67f58a3335
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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