enhance: remove block/anchor

pull/2883/head
Tienson Qin 2021-09-26 10:22:23 +08:00
parent ff5a7413f9
commit 821ffecaf3
2 changed files with 4 additions and 4 deletions

View File

@ -1523,7 +1523,7 @@
(declare block-content)
(defn build-block-title
[{:keys [slide?] :as config} {:block/keys [uuid title tags marker priority anchor meta format content pre-block? page properties unordered level heading-level]
[{:keys [slide?] :as config} {:block/keys [uuid title tags marker priority meta format content pre-block? page properties unordered level heading-level]
:as t}]
(let [config (assoc config :block t)
slide? (boolean (:slide? config))
@ -1553,8 +1553,7 @@
(->elem
elem
(merge
{:id anchor
:data-hl-type (:hl-type properties)}
{:data-hl-type (:hl-type properties)}
(when (and marker
(not (string/blank? marker))
(not= "nil" marker))

View File

@ -622,7 +622,8 @@
(block-keywordize)))
(select-keys first-block [:block/file :block/format :block/page]))
blocks)
blocks)]
blocks)
blocks (map (fn [block] (dissoc block :block/anchor)) blocks)]
(with-path-refs blocks)))
(catch js/Error e
(js/console.error "extract-blocks-failed")