allow multiple spaces in type answer

This commit is contained in:
Damien Elmes 2013-05-24 11:01:24 +09:00
parent 952f0cf6bd
commit e6ecbfd086

View file

@ -391,7 +391,10 @@ Please run Tools>Empty Cards""")
# munge correct value
parser = HTMLParser.HTMLParser()
cor = stripHTML(self.mw.col.media.strip(self.typeCorrect))
# ensure we don't chomp multiple whitespace
cor = cor.replace(" ", " ")
cor = parser.unescape(cor)
cor = cor.replace(u"\xa0", " ")
given = self.typedAnswer
# compare with typed answer
res = self.correct(given, cor, showBad=False)