diff --git a/src/components/Exercises/WriteBlanks.tsx b/src/components/Exercises/WriteBlanks.tsx index 622329b4..66624bb6 100644 --- a/src/components/Exercises/WriteBlanks.tsx +++ b/src/components/Exercises/WriteBlanks.tsx @@ -62,8 +62,8 @@ export default function WriteBlanks({id, prompt, type, maxWords, solutions, user (x) => solutions .find((y) => x.id.toString() === y.id.toString()) - ?.solution.map((y) => y.toLowerCase()) - .includes(x.solution.toLowerCase()) || false, + ?.solution.map((y) => y.toLowerCase().trim()) + .includes(x.solution.toLowerCase().trim()) || false, ).length; const missing = total - answers.filter((x) => solutions.find((y) => x.id === y.id)).length; diff --git a/src/components/Solutions/WriteBlanks.tsx b/src/components/Solutions/WriteBlanks.tsx index db6e7bd8..a7ef4f9b 100644 --- a/src/components/Solutions/WriteBlanks.tsx +++ b/src/components/Solutions/WriteBlanks.tsx @@ -81,8 +81,8 @@ export default function WriteBlanksSolutions({ (x) => solutions .find((y) => x.id.toString() === y.id.toString()) - ?.solution.map((y) => y.toLowerCase()) - .includes(x.solution.toLowerCase()) || false, + ?.solution.map((y) => y.toLowerCase().trim()) + .includes(x.solution.toLowerCase().trim()) || false, ).length; const missing = total - userSolutions.filter((x) => solutions.find((y) => x.id.toString() === y.id.toString())).length;