diff --git a/app/components/TextParser/TextParser.tsx b/app/components/TextParser/TextParser.tsx index 9cbdf4c..cf517b6 100644 --- a/app/components/TextParser/TextParser.tsx +++ b/app/components/TextParser/TextParser.tsx @@ -119,6 +119,20 @@ export function TextParser(props: TextParserProps) { return <>{match}; } }, + { + // unicode emojis + pattern: [/\p{Emoji_Presentation}/u], + render: (match: string) => { + let textWithoutEmojis = props.text.replace(/\p{Emoji_Presentation}/gu, ''); + if(textWithoutEmojis.length <= (props.oversizeIfTextSmallerThan ?? 0)) { + return ; + } + return ; + }, + flush: (match: string) => { + return ; + } + }, { // :emoji_code: pattern: [/:emoji_([a-zA-Z0-9_-]+):/],