diff options
author | Daniel Schadt <kingdread@gmx.de> | 2021-08-20 12:49:36 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2021-08-20 12:49:36 +0200 |
commit | a114ad49db792ec190a5cb6c96acc47669ac4b03 (patch) | |
tree | 4d7649a3efe54378141e5fba6778281d2da4b8b4 | |
parent | 22029400ef35ee7eb85bf5d89562738d65a38e75 (diff) | |
download | wikimini-a114ad49db792ec190a5cb6c96acc47669ac4b03.tar.gz wikimini-a114ad49db792ec190a5cb6c96acc47669ac4b03.tar.bz2 wikimini-a114ad49db792ec190a5cb6c96acc47669ac4b03.zip |
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.
-rw-r--r-- | wikimini/templates/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
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) |