diff options
author | Thanos Apollo <[email protected]> | 2023-12-27 10:06:38 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-27 10:06:38 +0200 |
commit | 5242c12bfe461c20500dd7f82ad5325b199c4341 (patch) | |
tree | 0aebb5112bda5f65963da376b97e38db2e7b7c03 /gnosis.el | |
parent | cbc0f2d04854dd2a05ce7fea26005bb587996c5d (diff) |
Add gnosis-display--cloze-user-answer
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -119,6 +119,17 @@ Example: (goto-char (point-min)) (search-forward cloze-chars nil t) (replace-match (propertize correct 'face 'gnosis-face-cloze-correct)))) + +(cl-defun gnosis-display--cloze-user-answer (user-input &optional (false nil)) + "Display USER-INPUT answer for cloze note. + +If FALSE t, use gnosis-face-cloze-false face" + (with-gnosis-buffer + (goto-char (point-max)) + (insert (concat "\nYour answer: " (propertize user-input 'face (if false + 'gnosis-face-cloze-false + 'gnosis-face-cloze-correct)))))) + (defun gnosis-display--correct-answer-mcq (answer user-choice) "Display correct ANSWER & USER-CHOICE for MCQ note." (with-gnosis-buffer |