From e57f15be0f48a5efd5b2abefa1da4144d1d45393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Such=C3=A1nek?= Date: Tue, 12 Sep 2023 11:27:24 +0200 Subject: [PATCH] fix #13 --- clean_commonscat.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clean_commonscat.py b/clean_commonscat.py index 030cd6f..ea3ae80 100644 --- a/clean_commonscat.py +++ b/clean_commonscat.py @@ -40,7 +40,9 @@ def setup(self): ns = '|'.join(self.site.namespaces[14]) self.empty_sectionR = re.compile( r'\s*\n==+ *Externí odkazy *==+ *\n\s*' - fr'(?:^==|^\{\{(?:{templates})|^\[\[(?:{ns}):)', flags=re.M) + r'^(?:==|\{\{(?:{templates})|\[\[(?:{ns}):)' + .format(templates=templates, ns=ns), + flags=re.M) def treat_page(self): # todo: treat_page_and_item page = self.current_page