Move common uses of page-ref to its own ns

By having a specific ns for page-ref utils, our code is more readable
and intention revealing. Also found that
text/{get-page-name,page-ref-un-brackets!} was getting called in
contexts that didn't make sense e.g. query layer was checking for
markdown and org page-refs
This commit is contained in:
Gabriel Horner
2022-08-01 14:49:27 -04:00
committed by Tienson Qin
parent 8be0deecd0
commit e0b1f6b2de
25 changed files with 201 additions and 145 deletions

View File

@@ -10,7 +10,8 @@
[frontend.ui :as ui]
[frontend.util :as util]
[frontend.mixins :as mixins]
[rum.core :as rum]))
[rum.core :as rum]
[logseq.graph-parser.util.page-ref :as page-ref]))
(defonce default-timestamp-value {:time ""
:repeater {}})
@@ -160,7 +161,7 @@
(when-not deadline-or-schedule?
;; similar to page reference
(editor-handler/insert-command! id
(util/format "[[%s]]" journal)
(page-ref/->page-ref journal)
format
nil)
(state/clear-editor-action!)