Skip to content

Commit

Permalink
fix: don't treat a block as pre block if it has auto heading
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Dec 15, 2023
1 parent 8dde33e commit 621faf9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions deps/graph-parser/src/logseq/graph_parser/block.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -519,23 +519,24 @@
(when (coll? refs)
refs))))
(map :block/original-name))
pre-block? (if (:heading properties) false true)
block {:block/uuid id
:block/content content
:block/level 1
:block/properties properties
:block/properties-order (vec properties-order)
:block/properties-text-values properties-text-values
:block/invalid-properties invalid-properties
:block/pre-block? true
:block/pre-block? pre-block?
:block/macros (extract-macros-from-ast body)
:block/body body}
{:keys [tags refs]}
(with-page-block-refs {:body body :refs property-refs} false db date-formatter)]
(cond-> block
tags
(assoc :block/tags tags)
true
(assoc :block/refs (concat refs (:block-refs pre-block-properties)))))
tags
(assoc :block/tags tags)
true
(assoc :block/refs (concat refs (:block-refs pre-block-properties)))))
(select-keys first-block [:block/format :block/page]))
blocks)
blocks)]
Expand Down Expand Up @@ -613,7 +614,7 @@
(str (gp-property/colons-org "id") " " (:block/uuid block)))))]
(string/replace-first c replace-str ""))))))

(defn block-exists-in-another-page?
(defn block-exists-in-another-page?
"For sanity check only.
For renaming file externally, the file is actually deleted and transacted before-hand."
[db block-uuid current-page-name]
Expand Down

0 comments on commit 621faf9

Please sign in to comment.