summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-05-18 05:48:24 +0300
committerThanos Apollo <[email protected]>2024-05-18 08:58:09 +0300
commit0ed567b0d95b53eebff1f0325957f926e9aa3da6 (patch)
treee1511cab2e48623c3e54546c572be05776eb0d49 /gnosis.el
parent68f7b7046e0c8b00c492d8fcc1939c1fa58ac4ba (diff)
Relocate gnosis-cloze-remov-tags
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 a8badb8..712a427 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -888,14 +888,6 @@ TYPE: Type of gnosis note, must be one of `gnosis-note-types'"
(history-add-new-input nil)) ;; Disable history
(gnosis-completing-read "Answer: " choices)))
-(defun gnosis-cloze-remove-tags (string)
- "Replace cx-tags in STRING.
-
-Works both with {} and {{}} to make easier to import anki notes."
- (let* ((regex "{\\{1,2\\}c\\([0-9]+\\)::?\\(.*?\\)}\\{1,2\\}")
- (result (replace-regexp-in-string regex "\\2" string)))
- result))
-
(defun gnosis-cloze-replace-words (string words new)
"In STRING replace only the first occurrence of each word in WORDS with NEW."
(cl-assert (listp words))
@@ -908,6 +900,14 @@ Works both with {} and {{}} to make easier to import anki notes."
word string)))
string)
+(defun gnosis-cloze-remove-tags (string)
+ "Remove cx-tags in STRING.
+
+Works both with {} and {{}} to make easier to import anki notes."
+ (let* ((regex "{\\{1,2\\}c\\([0-9]+\\)::?\\(.*?\\)}\\{1,2\\}")
+ (result (replace-regexp-in-string regex "\\2" string)))
+ result))
+
(defun gnosis-cloze-extract-answers (str)
"Extract cloze answers for STR.