diff --git a/src/libs/pronouns.js b/src/libs/pronouns.js index 8fcfd56..fb1268f 100644 --- a/src/libs/pronouns.js +++ b/src/libs/pronouns.js @@ -284,7 +284,10 @@ const knownPronouns = [ function extractFromBio(bio) { const exactMatches = bio.matchAll(/(\w+) ?\/ ?(\w+)/gi); for (const [match, subjective, objective] of exactMatches) { - if (knownPronouns.includes(subjective) && knownPronouns.includes(objective)) { + if ( + knownPronouns.includes(subjective.toLowerCase()) && + knownPronouns.includes(objective.toLowerCase()) + ) { return match.replaceAll(" ", ""); } } diff --git a/tests/extractPronouns.spec.js b/tests/extractPronouns.spec.js index eda8e8b..8ec74f6 100644 --- a/tests/extractPronouns.spec.js +++ b/tests/extractPronouns.spec.js @@ -104,6 +104,7 @@ const bioExtractTests = [ ["I'm cute af (she / they)", "she/they"], // with whitespace between pronouns ["pronouns: any/all", "any/all"], // any pronouns ["any pronouns", "any pronouns"], // any pronouns + ["He/Him", "He/Him"], //capitalised pronouns ]; for (const [input, expects] of bioExtractTests) { bioExtractSuite(input, async () => {