summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-28 04:04:25 +0200
committerThanos Apollo <[email protected]>2023-12-28 04:04:25 +0200
commit58b35802bf4c031b944f1c513467b08514f59c09 (patch)
tree6a50a899aea87f6f651dd4aae61c441b994a9d33 /gnosis.el
parent46e4792829b36f31c7e8e4df6667c2239781b2f8 (diff)
Organize review section
move gnosis-compare-strings above review section
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/gnosis.el b/gnosis.el
index 4686351..2313584 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -350,6 +350,14 @@ Valid cloze formats include:
(mapcar (lambda (tag-group) (nreverse (cdr tag-group)))
(nreverse result-alist))))
+(defun gnosis-compare-strings (str1 str2)
+ "Compare STR1 and STR2.
+
+Compare 2 strings, ignoring case and whitespace."
+ (let ((modified-str1 (downcase (replace-regexp-in-string "\\s-" "" str1)))
+ (modified-str2 (downcase (replace-regexp-in-string "\\s-" "" str2))))
+ (string= modified-str1 modified-str2)))
+
;; Review
;;;;;;;;;;
(defun gnosis-review--algorithm (id success)
@@ -394,14 +402,6 @@ Returns a list of the form (ef-increase ef-decrease ef)."
(old-ef (gnosis-get 'ef 'review `(= id ,id))))
(cl-substitute (gnosis-review-round ef) (nth 2 old-ef) old-ef)))
-(defun gnosis-compare-strings (str1 str2)
- "Compare STR1 and STR2.
-
-Compare 2 strings, ignoring case and whitespace."
- (let ((modified-str1 (downcase (replace-regexp-in-string "\\s-" "" str1)))
- (modified-str2 (downcase (replace-regexp-in-string "\\s-" "" str2))))
- (string= modified-str1 modified-str2)))
-
(defun gnosis-review--update (id success)
"Update review-log for note with value of id ID.