aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/question.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/question.rs b/src/gui/question.rs
index 1c4f179..727daa9 100644
--- a/src/gui/question.rs
+++ b/src/gui/question.rs
@@ -202,8 +202,8 @@ pub fn ask<B: Backend>(
}
fn is_correct(input: &str, responses: &[String]) -> bool {
- // Trim input
- let input = input.trim();
+ // Remove whitespaces
+ let input = input.split_whitespace().map(|word| word.trim()).collect::<Vec<&str>>().join(" ");
responses
.iter()