From 03a698760999cb6c545b72e6a92e83b5fae289d8 Mon Sep 17 00:00:00 2001 From: Jack Nam <30609178+thienlnam@users.noreply.github.com> Date: Wed, 2 Jul 2025 10:27:43 -0700 Subject: [PATCH] Revert "Chat - Formatting is incorrect when pasting code into the compose box" --- src/pages/home/report/comment/TextCommentFragment.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/home/report/comment/TextCommentFragment.tsx b/src/pages/home/report/comment/TextCommentFragment.tsx index 280b1b8b3cdc..88fa4f7eefb5 100644 --- a/src/pages/home/report/comment/TextCommentFragment.tsx +++ b/src/pages/home/report/comment/TextCommentFragment.tsx @@ -73,9 +73,7 @@ function TextCommentFragment({fragment, styleAsDeleted, reportActionID, styleAsM const containsEmojis = CONST.REGEX.ALL_EMOJIS.test(text ?? ''); if (!shouldRenderAsText(html, text ?? '') && !(containsOnlyEmojis && styleAsDeleted)) { const editedTag = fragment?.isEdited ? `` : ''; - // We don't want to replace the space in tags with   - const escapedHtml = html.replace(/(?:(?![\n\r])\s)(?![^<]*>)/g, ' '); - const htmlWithDeletedTag = styleAsDeleted ? `${escapedHtml}` : escapedHtml; + const htmlWithDeletedTag = styleAsDeleted ? `${html}` : html; let htmlContent = htmlWithDeletedTag; if (containsOnlyEmojis) {