mirror of https://github.com/logseq/logseq
fix(api): safety key string for the simple command key value
parent
b7c2a7b8f5
commit
3934efb537
|
@ -349,7 +349,7 @@
|
||||||
(fn [pid ^js cmd-action palette?]
|
(fn [pid ^js cmd-action palette?]
|
||||||
(when-let [[cmd action] (bean/->clj cmd-action)]
|
(when-let [[cmd action] (bean/->clj cmd-action)]
|
||||||
(let [action (assoc action 0 (keyword (first action)))
|
(let [action (assoc action 0 (keyword (first action)))
|
||||||
cmd (assoc cmd :key (string/replace (:key cmd) ":" "-"))
|
cmd (assoc cmd :key (-> (:key cmd) (string/trim) (string/replace ":" "-") (string/replace #"^([0-9])" "_$1")))
|
||||||
key (:key cmd)
|
key (:key cmd)
|
||||||
keybinding (:keybinding cmd)
|
keybinding (:keybinding cmd)
|
||||||
palette-cmd (plugin-handler/simple-cmd->palette-cmd pid cmd action)
|
palette-cmd (plugin-handler/simple-cmd->palette-cmd pid cmd action)
|
||||||
|
|
Loading…
Reference in New Issue