feat: support blurhash
This commit is contained in:
parent
af2c6d622b
commit
757a93c2a2
8 changed files with 102 additions and 25 deletions
|
@ -36,7 +36,7 @@ export function contentToVNode(
|
|||
handle: (node: Element) => Element | undefined | null | void = defaultHandle,
|
||||
customEmojis: Record<string, Emoji> = {},
|
||||
): VNode {
|
||||
content = content.replace(/:([\w-]+?):/g, (_, name) => {
|
||||
content = content.trim().replace(/:([\w-]+?):/g, (_, name) => {
|
||||
const emoji = customEmojis[name]
|
||||
if (emoji)
|
||||
return `<img src="${emoji.url}" alt="${name}" class="custom-emoji" />`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue