From 979698bad93d395386df9aaef893799244bf1177 Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Sat, 2 Sep 2023 17:27:21 +0100 Subject: [PATCH] Fix very dangerous pattern, support {{infl of}} --- bulgarian-subject-object/bg-subject-object.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bulgarian-subject-object/bg-subject-object.py b/bulgarian-subject-object/bg-subject-object.py index 46c4955..7d5d2e0 100644 --- a/bulgarian-subject-object/bg-subject-object.py +++ b/bulgarian-subject-object/bg-subject-object.py @@ -25,7 +25,7 @@ def main() -> None: except IndexError: print(f"Error: page {title} has no Bulgarian content", file=sys.stderr) - for inflection_template in bulgarian_section.filter(forcetype=mwparserfromhell.wikicode.Template, matches="{{inflection of|bg|.*?}}"): + for inflection_template in bulgarian_section.filter(forcetype=mwparserfromhell.wikicode.Template, matches=r"{{infl(?:ection)? of\|bg\|.*?}}"): inflection_template: mwparserfromhell.wikicode.Template fix_inflection(inflection_template)