fix: properly parse bolded italics (#1808)

This commit is contained in:
Zaidhaan 2023-02-23 15:13:39 +08:00 committed by GitHub
parent 29b37e67c7
commit f98c667613
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -445,7 +445,7 @@ function replaceCustomEmoji(customEmojis: Record<string, mastodon.v1.CustomEmoji
} }
const _markdownReplacements: [RegExp, (c: (string | Node)[]) => Node][] = [ const _markdownReplacements: [RegExp, (c: (string | Node)[]) => Node][] = [
[/\*\*\*(.*?)\*\*\*/g, c => h('b', null, [h('em', null, c)])], [/\*\*\*(.*?)\*\*\*/g, ([c]) => h('b', null, [h('em', null, c)])],
[/\*\*(.*?)\*\*/g, c => h('b', null, c)], [/\*\*(.*?)\*\*/g, c => h('b', null, c)],
[/\*(.*?)\*/g, c => h('em', null, c)], [/\*(.*?)\*/g, c => h('em', null, c)],
[/~~(.*?)~~/g, c => h('del', null, c)], [/~~(.*?)~~/g, c => h('del', null, c)],