Try to hide filter directive

This commit is contained in:
samfundev
2020-10-02 23:13:05 -04:00
committed by Tienson Qin
parent 88c9b16f77
commit 70dd56c09e
4 changed files with 12 additions and 8 deletions

View File

@@ -128,8 +128,9 @@
(defn pre-block-with-only-title?
[repo block-id]
(when-let [block (db/entity repo [:block/uuid block-id])]
(let [properties (:page/properties (:block/page block))]
(and (:title properties)
(let [properties (:page/properties (:block/page block))
property-names (keys properties)]
(and (every? #(util/in? % '(:title :filter)) property-names)
(= 1 (count properties))
(let [ast (mldoc/->edn (:block/content block) (mldoc/default-config (:block/format block)))]
(or