mirror of https://github.com/logseq/logseq
fix: [regression] tag autocomplete now adds extra brackets : #[[tag]] instead of #tag
Resolved #691pull/706/head
parent
34be1a4df7
commit
6a9ac5cb3f
|
@ -90,9 +90,11 @@
|
||||||
chosen-handler (if (state/sub :editor/show-page-search-hashtag?)
|
chosen-handler (if (state/sub :editor/show-page-search-hashtag?)
|
||||||
(fn [chosen _click?]
|
(fn [chosen _click?]
|
||||||
(state/set-editor-show-page-search! false)
|
(state/set-editor-show-page-search! false)
|
||||||
(let [page-ref-text (page-handler/get-page-ref-text chosen)]
|
(let [chosen (if (re-find #"\s+" chosen)
|
||||||
|
(util/format "[[%s]]" chosen)
|
||||||
|
chosen)]
|
||||||
(editor-handler/insert-command! id
|
(editor-handler/insert-command! id
|
||||||
(util/format "#%s" page-ref-text)
|
(str "#" chosen)
|
||||||
format
|
format
|
||||||
{:last-pattern (str "#" (if @editor-handler/*selected-text "" q))})))
|
{:last-pattern (str "#" (if @editor-handler/*selected-text "" q))})))
|
||||||
(fn [chosen _click?]
|
(fn [chosen _click?]
|
||||||
|
|
Loading…
Reference in New Issue