From ae652a37ec2db6782565a9e843bc967e060d3906 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 5 Feb 2023 11:20:04 +0100 Subject: Discard phonetics when checking response --- bin/dev-server | 7 +++++++ bin/watch.sh | 7 ------- src/gui/question.rs | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100755 bin/dev-server delete mode 100755 bin/watch.sh diff --git a/bin/dev-server b/bin/dev-server new file mode 100755 index 0000000..e3a6c28 --- /dev/null +++ b/bin/dev-server @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -euo pipefail + +watchexec \ + --watch src \ + --restart \ + "(killall flashcards || true) && tput reset && cargo build && bin/run.sh" diff --git a/bin/watch.sh b/bin/watch.sh deleted file mode 100755 index e3a6c28..0000000 --- a/bin/watch.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -watchexec \ - --watch src \ - --restart \ - "(killall flashcards || true) && tput reset && cargo build && bin/run.sh" diff --git a/src/gui/question.rs b/src/gui/question.rs index 5055417..abb8fd7 100644 --- a/src/gui/question.rs +++ b/src/gui/question.rs @@ -216,6 +216,7 @@ fn is_correct(input: &str, responses: &[String]) -> bool { responses .iter() .map(|r| r.split('(').collect::>()[0].trim()) + .map(|r| r.split('[').collect::>()[0].trim()) .any(|x| x == input) } -- cgit v1.2.3