mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Adding support for parameters in modifiers: {{mod1(param1,param2):mod2(param3):field}}
This commit is contained in:
parent
7dcf0d8ead
commit
90fd1c00c8
1 changed files with 1 additions and 0 deletions
|
@ -191,6 +191,7 @@ class Template(object):
|
|||
txt = self.clozeText(txt, extra, mod[1]) if txt and extra else ""
|
||||
else:
|
||||
# hook-based field modifier
|
||||
mod, extra = re.search("^(.*?)(?:\((.*)\))?$", mod).groups()
|
||||
txt = runFilter('fmod_' + mod, txt or '', extra, context,
|
||||
tag, tag_name);
|
||||
if txt is None:
|
||||
|
|
Loading…
Reference in a new issue