fix: page ref not working as linked ref in property value

Also, fixed page ref lowercased in property value. eg: authors::
[[Jeff Howard]] -> jeff howard

Zotero tags will be parsed too.
This commit is contained in:
Tienson Qin
2021-07-28 23:45:26 +08:00
parent 82456f2c85
commit 6abca45828
7 changed files with 36 additions and 12 deletions

View File

@@ -692,10 +692,13 @@
(defn properties-block
[properties format page]
(let [content (property/insert-properties format "" properties)]
(let [content (property/insert-properties format "" properties)
refs (block/get-page-refs-from-properties properties)]
{:block/pre-block? true
:block/uuid (db/new-block-id)
:block/properties properties
:block/properties-order (keys properties)
:block/refs refs
:block/left page
:block/format format
:block/content content
@@ -709,10 +712,13 @@
([title format page properties]
(let [p (common-handler/get-page-default-properties title)
ps (merge p properties)
content (property/insert-properties format "" ps)]
content (property/insert-properties format "" ps)
refs (block/get-page-refs-from-properties properties)]
{:block/pre-block? true
:block/uuid (db/new-block-id)
:block/properties ps
:block/properties-order (keys ps)
:block/refs refs
:block/left page
:block/format format
:block/content content