enhance: remove warning on multiple blocks

This commit is contained in:
Tienson Qin
2026-02-13 05:20:51 +08:00
parent ed240ac01e
commit 322a522be0
3 changed files with 5 additions and 11 deletions

View File

@@ -2588,12 +2588,7 @@
(task-spent-time-cp block)]
(block-content-inner config block ast-body plugin-slotted? collapsed? block-ref-with-title?)
(case (:block/warning block)
:multiple-blocks
[:p.warning.text-sm "Full content is not displayed, Logseq doesn't support multiple unordered lists or headings in a block."]
nil)]]))
(block-content-inner config block ast-body plugin-slotted? collapsed? block-ref-with-title?)]]))
(rum/defc block-refs-count < rum/static
[block block-refs-count' *hide-block-refs?]
@@ -3708,7 +3703,10 @@
["Horizontal_Rule"]
[:hr]
["Heading" h]
(block-container config h)
(let [{:keys [title]} h]
(->elem :div
(cons [:span "- "]
(map-inline config title))))
["List" l]
(let [lists (divide-lists l)]
(if (= 1 (count lists))

View File

@@ -57,8 +57,6 @@ and handles unexpected failure."
(extract-blocks ast title format {})))
new-block (first blocks)
block (cond-> (merge block new-block)
(> (count blocks) 1)
(assoc :block/warning :multiple-blocks)
true
(dissoc :block/format))
block (dissoc block :block.temp/ast-body :block/level)]

View File

@@ -50,8 +50,6 @@
[[:db/retract (:db/id entity) :block/parent]]
(:block/format entity)
[[:db/retract (:db/id entity) :block/format]]
(:block/warning entity)
[[:db/retract (:db/id entity) :block/warning]]
(= :whiteboard-shape (:logseq.property/ls-type entity))
[[:db/retractEntity (:db/id entity)]]
(and (:block/page entity) (not (:block/parent entity)))