Merge pull request #26 from ospalh/fix-type-answer-in-comment

Check for self.typedAnswer only after it has been set.
This commit is contained in:
Damien Elmes 2013-04-28 00:27:14 -07:00
commit 649d2b88ba

View File

@ -377,10 +377,10 @@ Please run Tools>Maintenance>Empty Cards""")
""" % (self.typeFont, self.typeSize), buf)
def typeAnsAnswerFilter(self, buf):
if not self.typeCorrect or not self.typedAnswer:
return re.sub(self.typeAnsPat, "", buf)
# tell webview to call us back with the input content
self.web.eval("_getTypedText();")
if not self.typeCorrect or not self.typedAnswer:
return re.sub(self.typeAnsPat, "", buf)
# munge correct value
parser = HTMLParser.HTMLParser()
cor = stripHTML(self.mw.col.media.strip(self.typeCorrect))