Fixes creation of Cloze when having a chained modifier on the left of cloze

This commit is contained in:
Julien Baley 2014-03-09 18:12:39 +00:00
parent 7dcf0d8ead
commit 69a19b58c2

View file

@ -690,7 +690,7 @@ class Editor(object):
def onCloze(self): def onCloze(self):
# check that the model is set up for cloze deletion # 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: if self.addMode:
tooltip(_("Warning, cloze deletions will not work until " tooltip(_("Warning, cloze deletions will not work until "
"you switch the type at the top to Cloze.")) "you switch the type at the top to Cloze."))