mirror of
https://github.com/logseq/logseq.git
synced 2026-04-27 07:35:01 +00:00
refactor: allow a block to have multiple types
For example, a whiteboard page can be used both as a property and a class.
This commit is contained in:
@@ -103,6 +103,6 @@
|
||||
page (first pages)]
|
||||
(is (= (get-in page [:block/file :file/path]) "/whiteboards/foo.edn"))
|
||||
(is (= (:block/name page) "foo"))
|
||||
(is (= (:block/type page) "whiteboard"))
|
||||
(is (true? (contains? (:block/type page) "whiteboard")))
|
||||
(is (= (:block/original-name page) "Foo"))
|
||||
(is (every? #(= (:block/parent %) {:block/name "foo"}) blocks))))
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
parent (:block/page (ffirst blocks))]
|
||||
(is (= {:block/name "foo"
|
||||
:block/original-name "Foo"
|
||||
:block/type "whiteboard"
|
||||
:block/type #{"whiteboard"}
|
||||
:block/file {:file/path "/whiteboards/foo.edn"}}
|
||||
parent)
|
||||
"parsed block in the whiteboard page has correct parent page"))))
|
||||
|
||||
Reference in New Issue
Block a user