fix: lint

This commit is contained in:
Tienson Qin
2024-12-09 21:24:40 +08:00
parent a025b4b096
commit 916a3e5bb1
2 changed files with 9 additions and 10 deletions

View File

@@ -6,7 +6,6 @@
[logseq.db :as ldb]
[logseq.common.date :as common-date]
[logseq.common.util.namespace :as ns-util]
[datascript.impl.entity :as de]
[clojure.set :as set]))
(defn ^:api validate-page-title-characters

View File

@@ -50,15 +50,15 @@
updated-blocks (->> (get-blocks @conn)
;; Only keep enough of content to uniquely identify block
(map #(hash-map :block/title (re-find #"\w+" (:block/title %))
:path-ref-names (set (map :block/name (:block/path-refs %))))))]
(let [page-tag-refs #{"tags" "page"}]
(is (= [{:block/title "parent"
:path-ref-names (set/union page-tag-refs #{"page1" "bar"})}
{:block/title "child"
:path-ref-names (set/union page-tag-refs #{"page1" "bar" "baz"})}
{:block/title "grandchild"
:path-ref-names (set/union page-tag-refs #{"page1" "bar" "baz" "bing"})}]
updated-blocks))))))
:path-ref-names (set (map :block/name (:block/path-refs %))))))
page-tag-refs #{"tags" "page"}]
(is (= [{:block/title "parent"
:path-ref-names (set/union page-tag-refs #{"page1" "bar"})}
{:block/title "child"
:path-ref-names (set/union page-tag-refs #{"page1" "bar" "baz"})}
{:block/title "grandchild"
:path-ref-names (set/union page-tag-refs #{"page1" "bar" "baz" "bing"})}]
updated-blocks)))))
(deftest block-content-refs
(let [conn (db-test/create-conn-with-blocks