From 3326254eec2ac80eea2fc3d4b4552963db4832ed Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 18 May 2013 18:07:34 +0900 Subject: [PATCH] fix cloze+latex issue in media check, and duplicate answers (#757, #758) we were replacing spans with spaces during review but not during media check. just strip the tags instead, which makes the media check consistent and doesn't result in multiple identical answers --- anki/latex.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/anki/latex.py b/anki/latex.py index 3d3ff917f..917cbcafd 100644 --- a/anki/latex.py +++ b/anki/latex.py @@ -64,8 +64,7 @@ def _latexFromHtml(col, latex): # replace it first latex = latex.replace(" ", " ") latex = re.sub("|
", "\n", latex) - # replace
etc with spaces - latex = re.sub("<.+?>", " ", latex) + latex = re.sub("<.+?>", "", latex) latex = stripHTML(latex) return latex