From 69c9c666947b69c8b8dcffaf9a66a7b6332a5b5d Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 28 Jan 2023 21:38:14 +1000 Subject: [PATCH] Skip answer comparison if the user didn't type anything --- qt/aqt/reviewer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt/aqt/reviewer.py b/qt/aqt/reviewer.py index 3583734e8..a2d15d529 100644 --- a/qt/aqt/reviewer.py +++ b/qt/aqt/reviewer.py @@ -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