From 58b35802bf4c031b944f1c513467b08514f59c09 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 28 Dec 2023 04:04:25 +0200 Subject: Organize review section move gnosis-compare-strings above review section --- gnosis.el | 16 ++++++++-------- 1 file 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. -- cgit v1.2.3