From 933bee43a06b7727c153ccf4d613646f9ab4c4a2 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 22 Mar 2012 15:51:36 +0900 Subject: [PATCH] use the first hint occurrence for any subsequent clozes --- anki/template/template.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/anki/template/template.py b/anki/template/template.py index 0486d15fb..dce750f70 100644 --- a/anki/template/template.py +++ b/anki/template/template.py @@ -199,8 +199,10 @@ class Template(object): return "" # replace chosen cloze with type if type == "q": - if m.group(2): - txt = re.sub(reg%ord, "[\\3...]", txt) + if m.group(3): + txt = re.sub( + reg%ord, "[%s...]" % m.group(3), + txt) else: txt = re.sub(reg%ord, "[...]", txt) elif type == "a":