Pārlūkot izejas kodu

fix: include node embed in linked references

fix https://github.com/logseq/db-test-cn/issues/11
Tienson Qin 1 gadu atpakaļ
vecāks
revīzija
dff466801d

+ 4 - 4
src/main/frontend/components/block.cljs

@@ -3071,10 +3071,10 @@
                                                (= (:block/uuid block) (:embed-id config)))
                                           table?)]
            (block-content-or-editor config block
-                                    {:edit-input-id edit-input-id
-                                     :block-id block-id
-                                     :edit? editing?
-                                     :hide-block-refs-count? hide-block-refs-count?}))])
+                                     {:edit-input-id edit-input-id
+                                      :block-id block-id
+                                      :edit? editing?
+                                      :hide-block-refs-count? hide-block-refs-count?}))])
 
       (when (and @*show-right-menu? (not in-whiteboard?) (not table?))
         (block-right-menu config block editing?))]

+ 10 - 10
src/main/frontend/components/reference.cljs

@@ -47,16 +47,16 @@
   [page-entity filters filtered-ref-blocks]
   (let [*ref (rum/use-ref nil)]
     [:div.references-blocks.faster.fade-in {:ref *ref}
-    (let [ref-hiccup (block/->hiccup filtered-ref-blocks
-                                     {:id (:block/title page-entity)
-                                      :scroll-container *ref
-                                      :ref? true
-                                      :breadcrumb-show? true
-                                      :group-by-page? true
-                                      :editor-box editor/box
-                                      :filters filters}
-                                     {})]
-      (content/content (:block/title page-entity) {:hiccup ref-hiccup}))]))
+     (let [ref-hiccup (block/->hiccup filtered-ref-blocks
+                                      {:id (str (:block/uuid page-entity))
+                                       :scroll-container *ref
+                                       :ref? true
+                                       :breadcrumb-show? true
+                                       :group-by-page? true
+                                       :editor-box editor/box
+                                       :filters filters}
+                                      {})]
+       (content/content (str (:block/uuid page-entity)) {:hiccup ref-hiccup}))]))
 
 (rum/defc references-cp
   [page-entity *filters total filter-n filtered-ref-blocks *ref-pages]

+ 0 - 1
src/main/frontend/db/model.cljs

@@ -632,7 +632,6 @@ independent of format as format specific heading characters are stripped"
           :entities
           (remove (fn [block]
                     (or
-                     (= (:db/id (:block/link block)) eid)
                      (= (:db/id block) eid)
                      (= eid (:db/id (:block/page block)))
                      (ldb/hidden? (:block/page block))