From b17946b2822319bfbaa82c45cdcac66d4ffd27a7 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 15 Jun 2018 11:24:59 +1000 Subject: [PATCH] fix detection of multiline cloze deletions --- anki/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/models.py b/anki/models.py index 310a1a0fc..38e08e1b8 100644 --- a/anki/models.py +++ b/anki/models.py @@ -576,7 +576,7 @@ select id from notes where mid = ?)""" % " ".join(map), continue ord = map[fname][0] ords.update([int(m)-1 for m in re.findall( - "{{c(\d+)::.+?}}", sflds[ord])]) + "(?s){{c(\d+)::.+?}}", sflds[ord])]) if -1 in ords: ords.remove(-1) if not ords and allowEmpty: