From b39eb39e0df1a0deaab98418553ca03d7bb0c4ba Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 31 Jan 2011 13:10:44 +0900 Subject: [PATCH] patches from bernhard --- ankiqt/ui/view.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ankiqt/ui/view.py b/ankiqt/ui/view.py index d6b4019b3..ee48f3fa2 100644 --- a/ankiqt/ui/view.py +++ b/ankiqt/ui/view.py @@ -202,8 +202,8 @@ class View(object): ret += self.applyStyle(b[i1], lastEqual, b[i1:i2]) lastEqual = "" elif tag == "insert": - dashNum = (j2 - j1) if ucd.category(a[i1]) != 'Mn' else ((j2 - j1) - 1) - ret += self.applyStyle(a[i1], lastEqual, "-" * dashNum) + dashNum = (j2 - j1) if ucd.category(a[j1]) != 'Mn' else ((j2 - j1) - 1) + ret += self.applyStyle(a[j1], lastEqual, "-" * dashNum) lastEqual = "" return ret + self.ok(lastEqual) @@ -221,8 +221,7 @@ class View(object): cor = "" if cor: given = unicode(self.main.typeAnswerField.text()) - res = self.correct(ucd.normalize('NFC', cor), - ucd.normalize('NFC', given)) + res = self.correct(cor, given) a = res + "
" + a self.write(self.center('' + self.mungeQA(self.main.deck, a)))