pull/6345/head
Peng Xiao 2022-07-24 12:15:58 +08:00
parent b347dc55ae
commit 754b952173
2 changed files with 5 additions and 5 deletions

View File

@ -188,15 +188,15 @@
[shape parent-ref]
(let [refs (or (get-shape-refs shape) [])]
(merge {:block/refs refs
:block/path-refs (into [] (concat [parent-ref] refs))})))
:block/path-refs (into [] (concat refs [parent-ref]))})))
(defn- with-whiteboard-content
[shape]
{:block/content (case (:type shape)
"text" (:text shape)
"logseq-portal" (str "[[" (:pageId shape) "]]")
"line" (str "arrow:" (:label shape))
"")})
"line" (str "whiteboard arrow: " (:label shape))
(str "whiteboard " (:type shape)))})
(defn with-whiteboard-block-props
[block]

View File

@ -6,7 +6,7 @@
[frontend.modules.outliner.file :as outliner-file]
[frontend.state :as state]
[frontend.util :as util]
[logseq.graph-parser.extract :refer [with-whiteboard-block-props]]))
[logseq.graph-parser.extract :as gp-extract]))
;; (defn set-linked-page-or-block!
;; [page-or-block-id]
@ -58,7 +58,7 @@
block {:block/page {:block/name (util/page-name-sanity-lc page-name)}
:block/parent {:block/name page-name}
:block/properties properties}
additional-props (with-whiteboard-block-props block)]
additional-props (gp-extract/with-whiteboard-block-props block)]
(merge block additional-props)))
(defn- tldr-page->blocks-tx [page-name tldr-data]