mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 08:56:29 +00:00
fix: ignore properties when displaying block's body
This commit is contained in:
@@ -21,6 +21,12 @@
|
||||
(vector? block)
|
||||
(= "Heading" (first block))))
|
||||
|
||||
(defn properties-block?
|
||||
[block]
|
||||
(and
|
||||
(vector? block)
|
||||
(= "Properties" (first block))))
|
||||
|
||||
(defn get-tag
|
||||
[block]
|
||||
(when-let [tag-value (and (vector? block)
|
||||
@@ -736,9 +742,11 @@
|
||||
ast (->> (format/to-edn content format (mldoc/default-config format))
|
||||
(map first))
|
||||
title (when (heading-block? (first ast))
|
||||
(:title (second (first ast))))]
|
||||
(:title (second (first ast))))
|
||||
body (vec (if title (rest ast) ast))
|
||||
body (drop-while properties-block? body)]
|
||||
(cond->
|
||||
{:block/body (vec (if title (rest ast) ast))}
|
||||
{:block/body body}
|
||||
title
|
||||
(assoc :block/title title))))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user