fix: some tests on graph_parser

This commit is contained in:
Tienson Qin
2022-08-31 14:26:51 +08:00
parent d64042df81
commit 040fd5510f
8 changed files with 153 additions and 115 deletions

View File

@@ -238,12 +238,14 @@
(defn parse-property-value
"Parses non-string property values or any page-ref like values"
[v]
(let [v (string/trim v)]
(if-some [res (text/parse-non-string-property-value v)]
res
(if (string/starts-with? v "#")
(subs v 1)
(or (page-ref/get-page-name v) v)))))
(let [result (if-some [res (text/parse-non-string-property-value v)]
res
(if (string/starts-with? v "#")
(subs v 1)
(or (page-ref/get-page-name v) v)))]
(if (string? result)
(string/trim result)
result)))
(defn- build-property-two-arg
[e]