From 267e6073cb9863f8bcef8ea0cf0c07d086d5792f Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 19 Mar 2026 22:09:41 -0500 Subject: [PATCH] stricter regex --- src/app/utils/pronouns.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/utils/pronouns.ts b/src/app/utils/pronouns.ts index 943547a0..0af478d7 100644 --- a/src/app/utils/pronouns.ts +++ b/src/app/utils/pronouns.ts @@ -89,7 +89,8 @@ export function getParsedPronouns(rawName: string, parseSetting: boolean) { } // match text like (she/her) or [he/they/them] but not (hi) - const regex = /[([]?([a-zA-Z]+\/[a-zA-Z]+(?:\/[a-zA-Z]+)?)[)\]]?/; + const regex = + /(?:\(([a-zA-Z]+\/[a-zA-Z]+(?:\/[a-zA-Z]+)?)\)|\[([a-zA-Z]+\/[a-zA-Z]+(?:\/[a-zA-Z]+)?)\])/; const match = rawName.match(regex); let result: { cleanedDisplayName: string; inlinePronoun: string | null } = {