refactor: html parsing
This commit is contained in:
parent
d76e4bfaa5
commit
6944a74653
8 changed files with 152 additions and 124 deletions
|
@ -51,3 +51,16 @@ export const customEmojisData = computed(() => currentCustomEmojis.value.emojis.
|
|||
emojis: transformEmojiData(currentCustomEmojis.value.emojis),
|
||||
}]
|
||||
: undefined)
|
||||
|
||||
export function useEmojisFallback(emojisGetter: () => Emoji[] | undefined) {
|
||||
return computed(() => {
|
||||
const result: Emoji[] = []
|
||||
const emojis = emojisGetter()
|
||||
if (emojis)
|
||||
result.push(...emojis)
|
||||
|
||||
result.push(...currentCustomEmojis.value.emojis)
|
||||
|
||||
return emojisArrayToObject(result)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue