fix: db import of markdown tables and multiline blocks

Fixes LOG-3072 and fixes LOG-3070
This commit is contained in:
Gabriel Horner
2024-08-07 12:25:57 -04:00
parent 337ae484f7
commit 66439dde68
3 changed files with 38 additions and 14 deletions

View File

@@ -167,7 +167,7 @@
;; Counts
;; Includes journals as property values e.g. :logseq.task/deadline
(is (= 17 (count (d/q '[:find ?b :where [?b :block/type "journal"]] @conn))))
(is (= 18 (count (d/q '[:find ?b :where [?b :block/type "journal"]] @conn))))
;; Don't count pages like url.md that have properties but no content
(is (= 6
@@ -346,6 +346,11 @@
count))
"A block with different case of same ref names has 1 distinct ref"))
(testing "multiline blocks"
(is (= "|markdown| table|\n|some|thing|" (:block/title (find-block-by-content @conn #"markdown.*table"))))
(is (= "multiline block\na 2nd\nand a 3rd" (:block/title (find-block-by-content @conn #"multiline block"))))
(is (= "logbook block" (:block/title (find-block-by-content @conn #"logbook block")))))
(testing "block refs and path-refs"
(let [block (find-block-by-content @conn "old todo block")]
(is (set/subset?