Merge remote-tracking branch 'upstream/master' into more-pasting-issues

This commit is contained in:
Peng Xiao
2022-10-18 10:38:56 +08:00
4 changed files with 13 additions and 16 deletions

View File

@@ -71,12 +71,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