mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
allow multiple spaces in type answer
This commit is contained in:
parent
952f0cf6bd
commit
e6ecbfd086
1 changed files with 3 additions and 0 deletions
|
|
@ -391,7 +391,10 @@ Please run Tools>Empty Cards""")
|
||||||
# munge correct value
|
# munge correct value
|
||||||
parser = HTMLParser.HTMLParser()
|
parser = HTMLParser.HTMLParser()
|
||||||
cor = stripHTML(self.mw.col.media.strip(self.typeCorrect))
|
cor = stripHTML(self.mw.col.media.strip(self.typeCorrect))
|
||||||
|
# ensure we don't chomp multiple whitespace
|
||||||
|
cor = cor.replace(" ", " ")
|
||||||
cor = parser.unescape(cor)
|
cor = parser.unescape(cor)
|
||||||
|
cor = cor.replace(u"\xa0", " ")
|
||||||
given = self.typedAnswer
|
given = self.typedAnswer
|
||||||
# compare with typed answer
|
# compare with typed answer
|
||||||
res = self.correct(given, cor, showBad=False)
|
res = self.correct(given, cor, showBad=False)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue