Finish block-ref helpers

There were a couple scattered in 2 text namespaces and there were
a couple uses of block-ref that involved escaping.
Removed block-ref-un-brackets! once it was seen as the equivalent
of an or statement
This commit is contained in:
Gabriel Horner
2022-07-26 15:21:47 -04:00
committed by Tienson Qin
parent a3d30e0b52
commit 001e0d302d
9 changed files with 51 additions and 54 deletions

View File

@@ -9,7 +9,7 @@
[frontend.handler.repo :as repo-handler]
[frontend.handler.ui :as ui-handler]
[logseq.graph-parser.util :as gp-util]
[frontend.util.text :as text-util]
[logseq.graph-parser.block :as gp-block]
[lambdaisland.glogi :as log]
[electron.ipc :as ipc]
[promesa.core :as p]
@@ -22,7 +22,7 @@
(defn- set-missing-block-ids!
[content]
(when (string? content)
(doseq [block-id (text-util/extract-all-block-refs content)]
(doseq [block-id (gp-block/get-all-block-ref-ids content)]
(when-let [block (try
(model/get-block-by-uuid block-id)
(catch js/Error _e