From ac6d534a9c8a5938135b588a19660cf30a33eb00 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Mon, 19 Sep 2022 16:32:16 +0800 Subject: [PATCH] fix: remove duplicate highlights by adding parent block id in the datascript query --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index f0a90ad..ee64332 100644 --- a/src/index.ts +++ b/src/index.ts @@ -191,6 +191,10 @@ const fetchOmnivore = async (inBackground = false) => { :where [?b :block/page ?p] [?p :block/original-name "${pageName}"] + [?b :block/parent ?parent] + [?parent :block/uuid ?u] + [(str ?u) ?s] + [(= ?s "${targetBlock.uuid}")] [?b :block/content ?c] [(clojure.string/includes? ?c "${article.slug}")]]` )