diff options
author | Thanos Apollo <[email protected]> | 2024-03-10 14:55:50 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-03-10 14:55:50 +0200 |
commit | 2f29c48b9c90f10751bf24afdb5ab13f7fe4d3a8 (patch) | |
tree | 0f84057603e8db8cfda764043637e05dc9c963d8 | |
parent | b95c25089f83cc42d3f7c76f02309603d9b4cd4b (diff) |
[fix] gnosis-cloze-replace-words: Fix string matching
Fix string matching to only match whole words
-rw-r--r-- | gnosis.el | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -799,7 +799,7 @@ Works both with {} and {{}} to make easier to import anki notes." "In STRING replace only the first occurrence of each word in WORDS with NEW." (cl-assert (listp words)) (cl-loop for word in words - do (if (string-match (regexp-quote word) string) + do (if (string-match (concat "\\b" (regexp-quote word) "\\b") string) (setq string (replace-match new t t string)) ;; This error will be produced when user has edited a ;; note to an invalid cloze. |