mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
Merge branch 'master' of github.com:dae/anki
This commit is contained in:
commit
c4c031d680
2 changed files with 2 additions and 1 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:
|
||||
|
|
|
@ -690,7 +690,7 @@ class Editor(object):
|
|||
|
||||
def onCloze(self):
|
||||
# check that the model is set up for cloze deletion
|
||||
if '{{cloze:' not in self.note.model()['tmpls'][0]['qfmt']:
|
||||
if not re.search('{{(.*:)*cloze:',self.note.model()['tmpls'][0]['qfmt']):
|
||||
if self.addMode:
|
||||
tooltip(_("Warning, cloze deletions will not work until "
|
||||
"you switch the type at the top to Cloze."))
|
||||
|
|
Loading…
Reference in a new issue