mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
tolerate incorrect {{=foo}} reference
This commit is contained in:
parent
9f2cf172f9
commit
b4c7985757
1 changed files with 5 additions and 1 deletions
|
@ -215,6 +215,10 @@ class Template(object):
|
||||||
@modifier('=')
|
@modifier('=')
|
||||||
def render_delimiter(self, tag_name=None, context=None):
|
def render_delimiter(self, tag_name=None, context=None):
|
||||||
"""Changes the Mustache delimiter."""
|
"""Changes the Mustache delimiter."""
|
||||||
self.otag, self.ctag = tag_name.split(' ')
|
try:
|
||||||
|
self.otag, self.ctag = tag_name.split(' ')
|
||||||
|
except ValueError:
|
||||||
|
# invalid
|
||||||
|
return
|
||||||
self.compile_regexps()
|
self.compile_regexps()
|
||||||
return ''
|
return ''
|
||||||
|
|
Loading…
Reference in a new issue