stricter regex

This commit is contained in:
7w1 committed 2026-03-19 22:09:41 -05:00
1 parent dd91aca505
commit 267e6073cb
1 file changed
+2 -1
+2 -1
View File
@@ -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 } = {