Skip to content

Commit

Permalink
Skip answer comparison if the user didn't type anything
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Jan 28, 2023
1 parent 4922654 commit 6b7d372
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qt/aqt/reviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,11 @@ def typeAnsAnswerFilter(self, buf: str) -> str:
# 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
Expand Down

0 comments on commit 6b7d372

Please sign in to comment.