forked from Mirrors/elk
fix: empty code blocks (#978)
This commit is contained in:
parent
689ae0c701
commit
67f58a3335
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ export const isEmptyDraft = (draft: Draft | null | undefined) => {
|
||||||
return true
|
return true
|
||||||
const { params, attachments } = draft
|
const { params, attachments } = draft
|
||||||
const status = params.status || ''
|
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)
|
return (text.length === 0)
|
||||||
&& attachments.length === 0
|
&& attachments.length === 0
|
||||||
|
|
Loading…
Reference in a new issue