From 69a19b58c27695de1569bf8b1e83b9f77f819172 Mon Sep 17 00:00:00 2001 From: Julien Baley Date: Sun, 9 Mar 2014 18:12:39 +0000 Subject: [PATCH] Fixes creation of Cloze when having a chained modifier on the left of cloze --- aqt/editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/editor.py b/aqt/editor.py index ce76ebe3f..755bfbd7e 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -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."))