fix: db import of blocks with namespaced tags are only tagged

with child leaf tag. Fixes two tags issue reported in
https://github.com/logseq/db-test/issues/7#issuecomment-2463162620
This commit is contained in:
Gabriel Horner
2024-11-18 16:49:21 -05:00
parent bb98ec1004
commit 3469dfd65d
2 changed files with 23 additions and 13 deletions

View File

@@ -493,7 +493,12 @@
(is (= [{:block/type "class"}]
(d/q '[:find [(pull ?b [:block/type]) ...] :where [?b :block/name "life"]] @conn))
"When a class is used and referenced on the same page, there should only be one instance of it")))
"When a class is used and referenced on the same page, there should only be one instance of it")
(is (= ["life"]
(->> (:block/tags (find-block-by-content @conn #"with namespace tag"))
(mapv #(db-property/ref->property-value-contents @conn %))))
"Block tagged with namespace tag is only associated with leaf child tag")))
(deftest-async export-files-with-tag-classes-option
(p/let [file-graph-dir "test/resources/exporter-test-graph"