branch: externals/gnosis
commit fdd2c0c587f3ac514e3761fb80a9988ec821d8f4
Author: Thanos Apollo <[email protected]>
Commit: Thanos Apollo <[email protected]>

    [fix] mc-cloze: answer must be member of hypothesis.
---
 gnosis.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnosis.el b/gnosis.el
index cc655d001f..8905eec5d1 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1137,7 +1137,7 @@ DECK-ID: ID for deck.
 ID: Integer for thema ID.
 TYPE: String for type, must be \"mc-cloze\".
 HYPOTHESIS: List of strings or nil, hypothesis in mc-cloze thema types
-serve as hints.
+serve as answer options.
 ANSWER: List of answers for mc-clozes.
 TAGS: List of tags.
 PARATHEMA: Parathema for thema.
@@ -1149,7 +1149,9 @@ LINKS: list of strings."
   (cl-assert (and (listp hypothesis)
                  (> (length hypothesis) (length answer)))
             nil "Hypothesis value must be a list, greater in length of 
ANSWER.")
-  (cl-assert (and (listp answer) (length= answer 1)) nil
+  (cl-assert (and (listp answer) (length= answer 1)
+                 (member (car answer) hypothesis))
+            nil
             "ANSWER value must be a list of one item.")
   (cl-assert (and (listp tags)
                  (cl-every 'stringp tags))

Reply via email to