message: add support for possessive pronouns and show up to three pairs
diff: @@ -12,26 +12,34 @@ const wrappers = [
  const subjects = table.map((l) => l[0]).join('|');
  const objects = table.map((l) => l[1]).join('|');
  +const possessive = table.map((l) => l[2]).join('|');
  const openingWrappers = wrappers.map((l) => '\\' + l[0]).join('|');
  const closingWrappers = wrappers.map((l) => '\\' + l[1]).join('|');
  const pairRegex = new RegExp(
  - `(?:${openingWrappers}|)(?:(${subjects})(?:[\\s]+|)[${separators}]+(?:[\\s]{1,3}|)(${objects}))(?:${closingWrappers}|)`,
  - 'i'
  + `(?:${openingWrappers}|)(?:(${subjects})(?:[\\s]+|)[${separators}]+(?:[\\s]{1,3}|)(${possessive}|${objects}|${subjects}}))(?:${closingWrappers}|)`,
  + 'gi'
  );
  -export function extractPronouns(string: string): [string, string] | undefined {
  - const match = pairRegex.exec(string.toLocaleLowerCase());
  - if (!match) {
  +export function extractPronouns(string: string): string | undefined {
  + const matches = Array.from(string.toLowerCase().matchAll(pairRegex));
  +
  + if (matches.length === 0) {
  return undefined;
  }
  - return [match[1], match[2]];
  +
  + return matches
  + .slice(0, 3)
  + .map((match) => {
  + return [match[1], match[2]].join('/');
  + })
  + .join(' ');
  }
  export const displayPronouns = makeBTDModule(({TD}) => {
  TD.services.TwitterUser.prototype.getPronouns = function getPronouns() {
  const maybePronouns = extractPronouns(this.description) || extractPronouns(this.location);
  - return maybePronouns?.map((l) => l.toLowerCase()).join('/');
  + return maybePronouns;
  };
  modifyMustacheTemplate(TD, 'status/tweet_single.mustache', (string) => {
  