mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Check for self.typedAnswer only after it has been set.
This commit is contained in:
parent
6ef7354fe2
commit
9239c62a42
1 changed files with 2 additions and 2 deletions
|
@ -377,10 +377,10 @@ Please run Tools>Maintenance>Empty Cards""")
|
||||||
""" % (self.typeFont, self.typeSize), buf)
|
""" % (self.typeFont, self.typeSize), buf)
|
||||||
|
|
||||||
def typeAnsAnswerFilter(self, 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
|
# tell webview to call us back with the input content
|
||||||
self.web.eval("_getTypedText();")
|
self.web.eval("_getTypedText();")
|
||||||
|
if not self.typeCorrect or not self.typedAnswer:
|
||||||
|
return re.sub(self.typeAnsPat, "", buf)
|
||||||
# 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))
|
||||||
|
|
Loading…
Reference in a new issue