Explorar o código

fix: pages don't have #Page tag when importing from markdown files

related to https://github.com/logseq/db-test/issues/641
Tienson Qin hai 1 día
pai
achega
81cbc1e701
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      deps/graph-parser/src/logseq/graph_parser/exporter.cljs

+ 2 - 1
deps/graph-parser/src/logseq/graph_parser/exporter.cljs

@@ -227,7 +227,8 @@
                                 (disj :logseq.class/Page))))
         (seq page-tags)
         (merge {:logseq.property/page-tags page-tags})))
-    block))
+    ;; ensure page at least have a Page tag
+    (assoc block :block/tags [:logseq.class/Page])))
 
 (defn- add-uuid-to-page-map [m page-names-to-uuids]
   (assoc m :block/uuid (get-page-uuid page-names-to-uuids (:block/name m) {:block m})))