Skip to content

Commit

Permalink
fix: 🐛 wrap slack emoji by span
Browse files Browse the repository at this point in the history
  • Loading branch information
themashcodee committed Jul 12, 2024
1 parent a615b0c commit 641bd4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/markdown_parser/sub_elements/slack_emoji.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ export const SlackEmoji = (props: Props) => {
const { element } = props;
const { hooks } = useGlobalData();

if (hooks.emoji) return hooks.emoji(element.value, (name) => parseEmojis(`:${name}:`));
if (hooks.emoji)
return (
<span className="slack_emoji">
{hooks.emoji(element.value, (name) => parseEmojis(`:${name}:`))}
</span>
);

return <span className="slack_emoji">{parseEmojis(`:${element.value}:`)}</span>;
};

0 comments on commit 641bd4b

Please sign in to comment.