mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Skip answer comparison if the user didn't type anything
This commit is contained in:
parent
4922654d8f
commit
6b7d372ca9
1 changed files with 5 additions and 2 deletions
|
@ -610,8 +610,11 @@ class Reviewer:
|
|||
# munge correct value
|
||||
expected = self.typeCorrect
|
||||
provided = self.typedAnswer
|
||||
# compare with typed answer
|
||||
output = self.mw.col.compare_answer(expected, provided)
|
||||
if not provided:
|
||||
output = expected
|
||||
else:
|
||||
# compare with typed answer
|
||||
output = self.mw.col.compare_answer(expected, provided)
|
||||
# and update the type answer area
|
||||
def repl(match: Match) -> str:
|
||||
# can't pass a string in directly, and can't use re.escape as it
|
||||
|
|
Loading…
Reference in a new issue