mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
don't throw an error on unclosed conditional tags
This commit is contained in:
parent
abf6e3fa13
commit
bde4420fb0
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ class Template(object):
|
||||||
func = modifiers[tag_type]
|
func = modifiers[tag_type]
|
||||||
replacement = func(self, tag_name, context)
|
replacement = func(self, tag_name, context)
|
||||||
template = template.replace(tag, replacement)
|
template = template.replace(tag, replacement)
|
||||||
except SyntaxError:
|
except (SyntaxError, KeyError):
|
||||||
return u"{{invalid template}}"
|
return u"{{invalid template}}"
|
||||||
|
|
||||||
return template
|
return template
|
||||||
|
|
Loading…
Reference in a new issue