ignore html in conditional tags
This commit is contained in:
parent
073f129ab8
commit
1203775aef
@ -1,5 +1,5 @@
|
||||
import re
|
||||
from anki.utils import stripHTML
|
||||
from anki.utils import stripHTML, stripHTMLMedia
|
||||
from anki.hooks import runFilter
|
||||
from anki.template import furigana; furigana.install()
|
||||
from anki.template import hint; hint.install()
|
||||
@ -99,6 +99,8 @@ class Template(object):
|
||||
replacer = ''
|
||||
# if it and isinstance(it, collections.Callable):
|
||||
# replacer = it(inner)
|
||||
if isinstance(it, basestring):
|
||||
it = stripHTMLMedia(it).strip()
|
||||
if it and not hasattr(it, '__iter__'):
|
||||
if section[2] != '^':
|
||||
replacer = inner
|
||||
|
Loading…
Reference in New Issue
Block a user