diff options
author | Thanos Apollo <[email protected]> | 2023-12-27 10:06:19 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-27 10:06:19 +0200 |
commit | cbc0f2d04854dd2a05ce7fea26005bb587996c5d (patch) | |
tree | eec940539e4805c2606745fabf59950c815e61ff | |
parent | 0677731a081c4e41404eabd447ad2c230519c0f4 (diff) |
Add gnosis-display--cloze-correct
-rw-r--r-- | gnosis.el | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -113,6 +113,12 @@ Example: (fill-paragraph (insert (gnosis-cloze-replace-words sentence clozes gnosis-cloze-char))))) +(defun gnosis-display--cloze-correct (cloze-chars correct) + "Replace CLOZE-CHARS with CORRECT." + (with-gnosis-buffer + (goto-char (point-min)) + (search-forward cloze-chars nil t) + (replace-match (propertize correct 'face 'gnosis-face-cloze-correct)))) (defun gnosis-display--correct-answer-mcq (answer user-choice) "Display correct ANSWER & USER-CHOICE for MCQ note." (with-gnosis-buffer @@ -362,7 +368,7 @@ SUCCESS is a binary value, 1 is for successful review." (message "Correct!")) (gnosis-review--update id 0) (message "False")) - (sit-for 0.5) + (sit-for 0.3) (gnosis-display--correct-answer-mcq answer user-choice) (gnosis-display--extra id))) |