Make pronoun.is pronouns look a little better
This commit is contained in:
parent
0cdfc500ff
commit
0083f767b3
|
@ -49,7 +49,7 @@ let allPronouns = [
|
||||||
"xey", "xem", "xyr"
|
"xey", "xem", "xyr"
|
||||||
].join("|");
|
].join("|");
|
||||||
let pronounListRegex = new RegExp('\\W*((' + allPronouns + ')(\\s*/\\s*(' + allPronouns + '))+)\\W*', 'i');
|
let pronounListRegex = new RegExp('\\W*((' + allPronouns + ')(\\s*/\\s*(' + allPronouns + '))+)\\W*', 'i');
|
||||||
let myPronounIsRegex = /(https?:\/\/)?(my\.)?pronoun\.is\/[\w/]+/i;
|
let myPronounIsRegex = /(https?:\/\/)?(my\.)?pronoun\.is\/([\w/]+)/i;
|
||||||
let explicitPronounsRegex = /pronouns:\s*([^.\n]*)(\.|\n|$)/im;
|
let explicitPronounsRegex = /pronouns:\s*([^.\n]*)(\.|\n|$)/im;
|
||||||
|
|
||||||
// Keys: user IDs
|
// Keys: user IDs
|
||||||
|
@ -76,7 +76,7 @@ function getPronouns(aboutMe) {
|
||||||
// http://my.pronoun.is/she
|
// http://my.pronoun.is/she
|
||||||
var match = myPronounIsRegex.exec(aboutMe);
|
var match = myPronounIsRegex.exec(aboutMe);
|
||||||
if (match != null) {
|
if (match != null) {
|
||||||
return match[0];
|
return match[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Explicit pronouns specification, e.g.
|
// Explicit pronouns specification, e.g.
|
||||||
|
|
Loading…
Reference in New Issue