diff options
author | Thanos Apollo <[email protected]> | 2023-12-27 07:15:06 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-27 07:15:06 +0200 |
commit | 5a25c324919fc46bfd7353f53430eab0e2949552 (patch) | |
tree | b065d2774739ec445e6a7aa065b23fb54cf9d9f5 /gnosis.el | |
parent | 2079d1e1c33918d35645d78c901db7c72b807d78 (diff) |
Redo gnosis-review-cloze--input
Return t or nil depending on user input, this will be used on cl-loop,
otherwise depending on this function for a sentence wiht multiple
clozes would be a mess
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -349,16 +349,14 @@ SUCCESS is a binary value, 1 is for successful review." (gnosis-display--correct-answer-mcq answer user-choice) (gnosis-display--extra id))) -(defun gnosis-review-cloze--input (id answer) +(defun gnosis-review-cloze--input (cloze) "Prompt for user input during cloze review. -If user-input is equal to ANSWER, update card ID for successful review." - (let ((user-input (downcase (read-string "Answer: ")))) - (if (string= user-input (downcase answer)) - (progn (gnosis-review--update id 1) - (message "Correct!")) - (gnosis-review--update id 0) - (message "Fail")))) +If user-input is equal to CLOZE, return t." + (let ((user-input (read-string "Cloze: "))) + (if (string= user-input cloze) + t + nil))) (defun gnosis-review-cloze (id) "Review cloze type note for ID." |