From d5da43bbf6b55415404905b671d7af04e2519ecb Mon Sep 17 00:00:00 2001 From: Arjun Porwal <65214523+ap211unitech@users.noreply.github.com> Date: Thu, 19 Jun 2025 22:08:24 +0530 Subject: [PATCH] fix: improve regex for weight formatting in formatMeta function (#11640) --- packages/react-components/src/Expander.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-components/src/Expander.tsx b/packages/react-components/src/Expander.tsx index a82e602ad0..952618f920 100644 --- a/packages/react-components/src/Expander.tsx +++ b/packages/react-components/src/Expander.tsx @@ -52,7 +52,7 @@ function formatMeta (meta?: Meta): [React.ReactNode, React.ReactNode] | null { firstEmpty === -1 ? strings : strings.slice(0, firstEmpty) - ).join(' ').replace(/#(| ).*<\/weight>/, ''); + ).join(' ').replace(/# ?[^<]*<\/weight>/, ''); const parts = splitParts(combined.replace(/\\/g, '').replace(/`/g, '')); return [