Skip to content

Commit

Permalink
Update emoji asset url
Browse files Browse the repository at this point in the history
  • Loading branch information
mdirolf committed Mar 29, 2024
1 parent d890b6d commit 966ef2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/lib/markdown/twemojify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ export const twemojify: Plugin = () => {
return [node];
}
const value = node.value;
const emoji = parse(value, { assetType: 'png' });
const emoji = parse(value, {
buildUrl: (codepoints) =>
`https://cdn.jsdelivr.net/gh/jdecked/twemoji@latest/assets/72x72/${codepoints}.png`,
});
if (emoji.length === 0) {
return [node];
}
Expand Down

0 comments on commit 966ef2f

Please sign in to comment.