aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/question.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/question.rs b/src/gui/question.rs
index 5f060e3..55c099d 100644
--- a/src/gui/question.rs
+++ b/src/gui/question.rs
@@ -169,6 +169,9 @@ pub fn ask<B: Backend>(
}
fn is_correct(input: &str, responses: &[String]) -> bool {
+ // Trim input
+ let input = input.trim();
+
responses
.iter()
.map(|r| r.split('(').collect::<Vec<&str>>()[0].trim())