mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 15:47:12 -05:00
fix bug in type answer
This commit is contained in:
parent
75fc98cdba
commit
84293c9d7a
1 changed files with 5 additions and 1 deletions
|
|
@ -151,7 +151,11 @@ class View(object):
|
|||
given = unicode(self.main.mainWin.typeAnswerField.text())
|
||||
res = []
|
||||
for (i, c) in enumerate(given):
|
||||
if c == cor[i]:
|
||||
try:
|
||||
yes = c == cor[i]
|
||||
except IndexError:
|
||||
yes = False
|
||||
if yes:
|
||||
res.append("<span style='color: #007700'>%s</span>" % c)
|
||||
else:
|
||||
res.append("<span style='color: #770000'>%s</span>" % c)
|
||||
|
|
|
|||
Loading…
Reference in a new issue