fix: emoji alt text

This commit is contained in:
三咲智子 2022-11-29 16:00:22 +08:00
parent ea73107c23
commit 07622e9606
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E

View file

@ -56,7 +56,7 @@ export function contentToVNode(
.replace(/:([\w-]+?):/g, (_, name) => {
const emoji = customEmojis[name]
if (emoji)
return `<img src="${emoji.url}" alt="${name}" class="custom-emoji" />`
return `<img src="${emoji.url}" alt=":${name}:" class="custom-emoji" />`
return `:${name}:`
})
// handle code frames