mirror of
https://github.com/logseq/logseq.git
synced 2026-05-24 20:54:09 +00:00
fix: lint
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user