Merge branch 'master' into feat/reproducible-plugin

pull/6911/head
Tienson Qin 2022-10-18 16:57:22 +08:00 committed by GitHub
commit cb9ffa1e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -73,12 +73,13 @@
(defn- get-whiteboard-shape-refs-text
[text]
(when-let [tldr (get-whiteboard-tldr-from-text text)]
(->> (gobj/get tldr "shapes")
(mapv (fn [shape]
(let [shape-id (gobj/get shape "id")]
(block-ref/->block-ref shape-id))))
(string/join "\n"))))
(let [tldr (get-whiteboard-tldr-from-text text)]
(when (and tldr (object? tldr))
(->> (gobj/get tldr "shapes")
(mapv (fn [shape]
(let [shape-id (gobj/get shape "id")]
(block-ref/->block-ref shape-id))))
(string/join "\n")))))
(defn- paste-copied-blocks-or-text
;; todo: logseq/whiteboard-shapes is now text/html