From a1c8b3d95a00aaf93b27bde7567e400eb92003f2 Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Sun, 22 Mar 2026 19:21:11 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A2=D1=80=D0=B0=D0=BD=D1=81=D0=BB=D1=8F?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20Emoji=20=D0=B8=D0=B7=20Unicode=20=D0=BA=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B5=D0=BC=D1=83=20=D0=B2=D0=B8=D0=B4=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/TextParser/TextParser.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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_-]+):/],