From 07c86227b321c19a86fd618811b386258488c0aa Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 16 Jul 2024 17:18:14 +0300 Subject: cloze: Add quick fix for old cloze note format. --- gnosis.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnosis.el b/gnosis.el index 270e4d9..f9ddd7d 100644 --- a/gnosis.el +++ b/gnosis.el @@ -1493,6 +1493,11 @@ If user-input is equal to CLOZE, return t." (num 0) ;; Number of clozes revealed (hints (gnosis-get 'options 'notes `(= id ,id))) (success nil)) + ;; Quick fix for old cloze note versions. + (cond ((and (stringp hints) (string-empty-p hints)) + (setq hints nil)) + ((and (not (listp hints)) (not (string-empty-p hints))) + (setq hints (list hints)))) ;; Initially display the sentence with no reveals (gnosis-display-cloze-string main clozes hints nil nil) (cl-loop for cloze in clozes -- cgit v1.2.3