enhance(commands): jump out of the ending curly brackets when

embedding page or block
pull/2802/head
leizhe 2021-09-11 09:04:29 +09:00 committed by Tienson Qin
parent d5d7c1f007
commit 49ab36ce30
2 changed files with 4 additions and 2 deletions

View File

@ -1937,7 +1937,8 @@
format
{:last-pattern (str "((" (if @*selected-text "" q))
:end-pattern "))"
:postfix-fn (fn [s] (util/replace-first "))" s ""))})
:postfix-fn (fn [s] (util/replace-first "))" s ""))
:forward-pos 3})
;; Save it so it'll be parsed correctly in the future
(set-block-property! (:block/uuid chosen)

View File

@ -610,7 +610,8 @@
format
{:last-pattern (str "[[" (if @editor-handler/*selected-text "" q))
:end-pattern "]]"
:postfix-fn (fn [s] (util/replace-first "]]" s ""))}))))))
:postfix-fn (fn [s] (util/replace-first "]]" s ""))
:forward-pos 3}))))))
(defn create-today-journal!
[]