summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-03-05 07:58:49 +0200
committerThanos Apollo <[email protected]>2024-03-05 07:58:49 +0200
commit755377b18edb13f48d967fb37fbe60222b7b70ad (patch)
tree73a290699eed9b87aa4e5baddff64a0ae8220302
parent9517d5da9c3bf68c0b4e91d1cb8605937ae8e7d7 (diff)
Fix gnosis-compare-string
- Using = will not work when gnosis-string-difference is 1
-rw-r--r--gnosis.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnosis.el b/gnosis.el
index b3a2d67..84e5ed8 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -787,8 +787,8 @@ Valid cloze formats include:
"Compare STR1 and STR2.
Compare 2 strings, ignoring case and whitespace."
- (let ((string-compare-func (if (or (>= (length str1) gnosis-string-difference)
- (>= (length str2) gnosis-string-difference))
+ (let ((string-compare-func (if (or (> (length str1) gnosis-string-difference)
+ (> (length str2) gnosis-string-difference))
#'(lambda (str1 str2) (<= (string-distance str1 str2) gnosis-string-difference))
#'string=)))
(funcall string-compare-func