From 40286b3b7cc2c984e7c3b077565c20dc79707168 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 3 Dec 2025 10:24:36 +0800 Subject: [PATCH 1/3] fix markdown isn't rendered if contains custom emoji --- src/pages/home/report/comment/TextCommentFragment.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/comment/TextCommentFragment.tsx b/src/pages/home/report/comment/TextCommentFragment.tsx index a30cadb24fd1..1375f9f5c0ec 100644 --- a/src/pages/home/report/comment/TextCommentFragment.tsx +++ b/src/pages/home/report/comment/TextCommentFragment.tsx @@ -76,7 +76,7 @@ function TextCommentFragment({fragment, styleAsDeleted, reportActionID, styleAsM const containsOnlyEmojis = containsOnlyEmojisUtil(text ?? ''); const containsOnlyCustomEmoji = useMemo(() => containsOnlyCustomEmojiUtil(text), [text]); const containsEmojis = CONST.REGEX.ALL_EMOJIS.test(text ?? ''); - if (!shouldRenderAsText(html, text ?? '') && !(containsOnlyEmojis && styleAsDeleted) && (containsOnlyEmojis || !containsCustomEmoji(text))) { + if (!shouldRenderAsText(html, text ?? '') && !(containsOnlyEmojis && styleAsDeleted)) { const editedTag = fragment?.isEdited ? `` : ''; // We need to replace the space at the beginning of each line with   const escapedHtml = html.replaceAll(/(^|
)[ ]+/gm, (match: string, p1: string) => p1 + ' '.repeat(match.length - p1.length)); From c0b396512a955cb125969eeb6256a30783b545ae Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 3 Dec 2025 10:24:43 +0800 Subject: [PATCH 2/3] apply the custom emoji alignment fix --- src/components/EmojiWithTooltip/index.ios.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/EmojiWithTooltip/index.ios.tsx b/src/components/EmojiWithTooltip/index.ios.tsx index 1e2b99c11b87..b5ecfc43c250 100644 --- a/src/components/EmojiWithTooltip/index.ios.tsx +++ b/src/components/EmojiWithTooltip/index.ios.tsx @@ -5,15 +5,16 @@ import type EmojiWithTooltipProps from './types'; function EmojiWithTooltip({emojiCode, style = {}, isMedium = false}: EmojiWithTooltipProps) { const styles = useThemeStyles(); + const isCustomEmoji = emojiCode === '\uE100'; return isMedium ? ( - {emojiCode} + {emojiCode} ) : ( - {emojiCode} + {emojiCode} ); } From 160bfa750681ace4032fe89f173968eacb47cc82 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 3 Dec 2025 10:34:33 +0800 Subject: [PATCH 3/3] remove unused import --- src/pages/home/report/comment/TextCommentFragment.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/comment/TextCommentFragment.tsx b/src/pages/home/report/comment/TextCommentFragment.tsx index 1375f9f5c0ec..8a5e0b91f7ff 100644 --- a/src/pages/home/report/comment/TextCommentFragment.tsx +++ b/src/pages/home/report/comment/TextCommentFragment.tsx @@ -11,7 +11,7 @@ import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import convertToLTR from '@libs/convertToLTR'; import {canUseTouchScreen} from '@libs/DeviceCapabilities'; -import {containsCustomEmoji, containsOnlyCustomEmoji as containsOnlyCustomEmojiUtil, containsOnlyEmojis as containsOnlyEmojisUtil, splitTextWithEmojis} from '@libs/EmojiUtils'; +import {containsOnlyCustomEmoji as containsOnlyCustomEmojiUtil, containsOnlyEmojis as containsOnlyEmojisUtil, splitTextWithEmojis} from '@libs/EmojiUtils'; import Parser from '@libs/Parser'; import Performance from '@libs/Performance'; import {getHtmlWithAttachmentID, getTextFromHtml} from '@libs/ReportActionsUtils';