mirror of
https://github.com/logseq/logseq.git
synced 2026-05-19 10:22:37 +00:00
enhance: remove warning on multiple blocks
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user