diff options
author | Thanos Apollo <[email protected]> | 2024-05-18 05:47:38 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-05-18 05:47:38 +0300 |
commit | 68f7b7046e0c8b00c492d8fcc1939c1fa58ac4ba (patch) | |
tree | 9e729ce46a95033465aac8df21a10b552c98818b | |
parent | 9daaca28c61610e9266efbd6d93a02038c8d3e43 (diff) |
Add gnosis-mcc-extract-options
-rw-r--r-- | gnosis.el | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -847,6 +847,16 @@ See `gnosis-add-note--cloze' for more reference." :images (gnosis-select-images) :tags (gnosis-prompt-tags--split gnosis-previous-note-tags))) +(cl-defun gnosis-mcc-extract-options (str &optional (char gnosis-mcc-separator)) + "Extract options for MCC note type from STR. + +CHAR: separator for mcc, default to `gnosis-mcc-separator'" + (cl-remove-if + #'null + (mapcar (lambda (s) + (when (string-match-p (regexp-quote char) s) + (split-string s (regexp-quote char)))) + (split-string str " ")))) ;;;###autoload (defun gnosis-add-note (&optional deck type) "Create note(s) as TYPE interactively. |