From bd7ffca12cff6a23d902cc798e0177c008beb61d Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 11 Mar 2026 10:21:19 +0800 Subject: [PATCH] chore: tests --- web/app/components/app/in-site-message/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/components/app/in-site-message/index.tsx b/web/app/components/app/in-site-message/index.tsx index 728f58fb30..a3f42e7b1b 100644 --- a/web/app/components/app/in-site-message/index.tsx +++ b/web/app/components/app/in-site-message/index.tsx @@ -25,8 +25,10 @@ type InSiteMessageProps = { title: string } +const LINE_BREAK_REGEX = /\\n/g + function normalizeLineBreaks(text: string): string { - return text.replace(/\\n/g, '\n') + return text.replace(LINE_BREAK_REGEX, '\n') } function normalizeLinkData(data: unknown): { href: string, rel?: string, target?: string } | null {