This commit is contained in:
parent
f56b92fff0
commit
5d6eb7282a
9 changed files with 48 additions and 110 deletions
|
@ -20,17 +20,6 @@ export function resolveCustomEmoji(
|
|||
});
|
||||
}
|
||||
|
||||
export function appliedCustomEmoji(
|
||||
target: { innerHTML: string },
|
||||
content: string,
|
||||
emojis?: mastodon.v1.CustomEmoji[],
|
||||
) {
|
||||
createRenderEffect(() => {
|
||||
const result = emojis ? resolveCustomEmoji(content, emojis) : content;
|
||||
target.innerHTML = result;
|
||||
});
|
||||
}
|
||||
|
||||
export function hasCustomEmoji(s: string) {
|
||||
return CUSTOM_EMOJI_REGEX.test(s);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue