fix slash command clashes with Org-mode italics (#3010)

* enhance: fix https://github.com/logseq/logseq/issues/990

Co-authored-by: leizhe <leizhe@leizhedeMacBook-Air.local>
This commit is contained in:
llcc
2021-11-02 19:15:17 +08:00
committed by GitHub
parent e3c87fa232
commit b2e3901631
16 changed files with 176 additions and 199 deletions

View File

@@ -131,10 +131,12 @@
(move-cursor-to input pos)))
(defn move-cursor-to-thing
[input thing from]
(let [[content _pos] (get-input-content&pos input)
pos (string/index-of content thing from)]
(move-cursor-to input pos)))
([input thing]
(move-cursor-to-thing input thing (pos input)))
([input thing from]
(let [[content _pos] (get-input-content&pos input)
pos (string/index-of content thing from)]
(move-cursor-to input pos))))
(defn move-cursor-forward-by-word
[input]