enhance: display a warning if a block's content include multiple lists

or headings.
This commit is contained in:
Tienson Qin
2021-11-17 21:07:32 +08:00
parent 1f779774ff
commit ad7de321e0
3 changed files with 17 additions and 7 deletions

View File

@@ -1822,7 +1822,12 @@
(for [[idx child] (medley/indexed body)]
(when-let [block (markup-element-cp config child)]
(rum/with-key (block-child block)
(str uuid "-" idx)))))])]]]))
(str uuid "-" idx)))))])
(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)]]]))
(rum/defc block-refs-count < rum/reactive
[block]