mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
switch raw and escaped modifiers
This commit is contained in:
parent
6d787a92f1
commit
9f6a21e0a7
1 changed files with 3 additions and 3 deletions
|
@ -116,7 +116,8 @@ class Template(object):
|
||||||
|
|
||||||
return template
|
return template
|
||||||
|
|
||||||
@modifier(None)
|
@modifier('{')
|
||||||
|
@modifier('&')
|
||||||
def render_tag(self, tag_name, context):
|
def render_tag(self, tag_name, context):
|
||||||
"""Given a tag name and context, finds, escapes, and renders the tag."""
|
"""Given a tag name and context, finds, escapes, and renders the tag."""
|
||||||
raw = get_or_attr(context, tag_name, '')
|
raw = get_or_attr(context, tag_name, '')
|
||||||
|
@ -129,8 +130,7 @@ class Template(object):
|
||||||
"""Rendering a comment always returns nothing."""
|
"""Rendering a comment always returns nothing."""
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
@modifier('{')
|
@modifier(None)
|
||||||
@modifier('&')
|
|
||||||
def render_unescaped(self, tag_name=None, context=None):
|
def render_unescaped(self, tag_name=None, context=None):
|
||||||
"""Render a tag without escaping it."""
|
"""Render a tag without escaping it."""
|
||||||
return unicode(get_or_attr(context, tag_name, ''))
|
return unicode(get_or_attr(context, tag_name, ''))
|
||||||
|
|
Loading…
Reference in a new issue