mirror of
https://github.com/logseq/logseq.git
synced 2026-02-01 14:43:56 +00:00
fix: import of unlinked pdf annotations
This addresses the importer failing for https://github.com/logseq/db-test/issues/732
This commit is contained in:
@@ -563,6 +563,12 @@
|
||||
(translate-linked-ref-filters prop-value page-names-to-uuids)
|
||||
:ls-type
|
||||
[[:logseq.property/ls-type (keyword prop-value)]]
|
||||
:hl-color
|
||||
(let [color-text-idents
|
||||
(->> (get-in db-property/built-in-properties [:logseq.property.pdf/hl-color :closed-values])
|
||||
(map (juxt :value :db-ident))
|
||||
(into {}))]
|
||||
[[:logseq.property.pdf/hl-color (get color-text-idents prop-value)]])
|
||||
;; else
|
||||
[[(built-in-property-file-to-db-idents prop) prop-value]]))))
|
||||
(into {}))]
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
(is (= 2 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Pdf-annotation]] @conn))))
|
||||
|
||||
;; Properties and tags aren't included in this count as they aren't a Page
|
||||
(is (= 10
|
||||
(is (= 11
|
||||
(->> (d/q '[:find [?b ...]
|
||||
:where
|
||||
[?b :block/title]
|
||||
|
||||
6
deps/graph-parser/test/resources/exporter-test-graph/pages/unlinked-highlights.md
vendored
Normal file
6
deps/graph-parser/test/resources/exporter-test-graph/pages/unlinked-highlights.md
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
- This is a highlights page that doesn't start with 'hls__' and isn't linked to a specific asset file
|
||||
- blarg blarg
|
||||
ls-type:: annotation
|
||||
hl-page:: 110
|
||||
hl-color:: purple
|
||||
id:: 654bafc6-f7e8-4633-b6a6-810dc41cc559
|
||||
Reference in New Issue
Block a user