enhance: (()) to embed && [[]] to reference

This commit is contained in:
Tienson Qin
2024-07-22 17:10:56 +08:00
parent 8864bd5b22
commit 8bb6e7be6b
3 changed files with 10 additions and 9 deletions

View File

@@ -1609,10 +1609,9 @@
(state/set-editor-action-data! {:pos (cursor/get-caret-pos input)
:selected selected}))
(and (= prefix block-ref/left-parens)
(not (config/db-based-graph? (state/get-current-repo))))
(do
(commands/handle-step [:editor/search-block :reference])
(= prefix block-ref/left-parens)
(let [db-based? (config/db-based-graph? (state/get-current-repo))]
(commands/handle-step [:editor/search-block (if db-based? :embed :reference)])
(state/set-editor-action-data! {:pos (cursor/get-caret-pos input)
:selected selected})))))))