Skip to content

Commit

Permalink
TextExtractor: remove categories added via {{post-nomials}}
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Apr 13, 2023
1 parent 21b7f3e commit a55bb98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TextExtractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ export default class TextExtractor {
// these are just bad
.replace(/__[A-Z]+__/g, '')
// Openings of any unclosed ref tags
.replace(/<ref[^<]*?(>|(?=\n))/gi, '');
.replace(/<ref[^<]*?(>|(?=\n))/gi, '')
// remove categories added via {{post-nomials}}
.replace(/(\|country=[A-Z]{3})-cats/, '$1');
}
}

0 comments on commit a55bb98

Please sign in to comment.