branch: elpa/gnosis
commit 444c2674891145c32581392ef7c421e6e1145e91
Author: Thanos Apollo <pub...@thanosapollo.org>
Commit: Thanos Apollo <pub...@thanosapollo.org>

    [fix] cloze-add-hints: Do not add escaped empty strings.
---
 gnosis.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnosis.el b/gnosis.el
index f401394591..090ec92c0d 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -532,8 +532,10 @@ If FILL-PARAGRAPH-P, insert question using 
`fill-paragraph'."
                while (search-forward cloze-string nil t)
                do
               (when (and hint (not (string-empty-p hint)) (not (string= hint 
"nil"))
+                         (not (string= "\"\"" hint))
                          (search-backward cloze-string nil t))
-                 (replace-match (propertize (format "[%s]" hint) 'face 
'gnosis-face-cloze))
+                 (replace-match (propertize (format "[%s]" hint)
+                                           'face 'gnosis-face-cloze))
                  (goto-char (match-end 0)))) ; Move point to end of match
       
       (buffer-string))))

Reply via email to