From a114ad49db792ec190a5cb6c96acc47669ac4b03 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Fri, 20 Aug 2021 12:49:36 +0200 Subject: strip template name before looking it up Some templates seem to be invoked with a trailing space at the end of the name, which we need to strip before searching our template registry. --- wikimini/templates/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/wikimini/templates/__init__.py b/wikimini/templates/__init__.py index 58a5db8..360b3fa 100644 --- a/wikimini/templates/__init__.py +++ b/wikimini/templates/__init__.py @@ -31,6 +31,7 @@ class Registry: Returns: The template if found, or :any:`None`. """ + name = name.strip() # Are templates case-sensitive? # Yes, except usually the first letter. # (https://en.wikipedia.org/wiki/Help:A_quick_guide_to_templates#FAQ) -- cgit v1.2.3