From ba52251611e5e08c5143b8b33b6cb2c9d4fbdd12 Mon Sep 17 00:00:00 2001 From: Jake <134332787+justjxke@users.noreply.github.com> Date: Tue, 16 Sep 2025 16:49:35 +0100 Subject: [PATCH] fix/tone indicators (#396) * add tone indicators plugin * im tired of this man * oh my fucking god its EquicordDevs not Devs * dont use json * Update index.tsx * fix regex for custom indicators and http:// * add support for hyphens, +, underscores, numbers, unicode. * Update index.tsx * bruh --------- Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com> Co-authored-by: justjxke --- src/equicordplugins/toneIndicators/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/equicordplugins/toneIndicators/index.tsx b/src/equicordplugins/toneIndicators/index.tsx index b70bc0d4a..9965fac3e 100644 --- a/src/equicordplugins/toneIndicators/index.tsx +++ b/src/equicordplugins/toneIndicators/index.tsx @@ -57,7 +57,7 @@ function splitTextWithIndicators(text: string): ReactNode[] { const nodes: ReactNode[] = []; let lastIndex = 0; let count = 0; - const regex = /\/([a-z]{1,20})(?=\s|$|[^\w])/gi; + const regex = /(?:^|\s)\/([^/\s]+)(?:$|\s|\p{P})/giu; let match: RegExpExecArray | null; while ((match = regex.exec(text)) && count < settings.store.maxIndicators) {