mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix multiple cloze tags contained on one line
inner regex was capturing multiple clozes. fixes https://anki.tenderapp.com/discussions/ankidesktop/6599-empty-cards-3533-cards-to-delete
This commit is contained in:
parent
966aca0f20
commit
694682d964
1 changed files with 1 additions and 1 deletions
|
@ -569,7 +569,7 @@ select id from notes where mid = ?)""" % " ".join(map),
|
|||
sflds = splitFields(flds)
|
||||
map = self.fieldMap(m)
|
||||
ords = set()
|
||||
matches = re.findall("{{[^}]*?cloze:(?:.*?:)*(.+?)}}", m['tmpls'][0]['qfmt'])
|
||||
matches = re.findall("{{[^}]*?cloze:(?:[^}]?:)*(.+?)}}", m['tmpls'][0]['qfmt'])
|
||||
matches += re.findall("<%cloze:(.+?)%>", m['tmpls'][0]['qfmt'])
|
||||
for fname in matches:
|
||||
if fname not in map:
|
||||
|
|
Loading…
Reference in a new issue