use innerHTML property
All checks were successful
/ depoly (push) Successful in 1m18s

This commit is contained in:
thislight 2024-11-24 17:16:06 +08:00
parent f56b92fff0
commit 5d6eb7282a
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
9 changed files with 48 additions and 110 deletions

View file

@ -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);
}