Skip to content

Commit ef7cbd7

Browse files
committed
fix: url type property rendered as link
1 parent b1050da commit ef7cbd7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

deps/publish/src/logseq/publish/render.cljs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,12 @@
161161
(let [title (publish-model/entity->title entity)
162162
uuid (:block/uuid entity)
163163
graph-uuid (:graph-uuid ctx)]
164-
(if (and uuid graph-uuid (publish-model/page-entity? entity))
164+
(cond
165+
(and uuid graph-uuid (publish-model/page-entity? entity))
165166
[[:a.page-ref {:href (str "/page/" graph-uuid "/" uuid)} title]]
167+
(common-util/url? title)
168+
[:a {:href title} title]
169+
:else
166170
[title])))
167171

168172
(defn property-value->nodes
@@ -174,10 +178,13 @@
174178
[]
175179

176180
(string? value)
177-
(if (= prop-type :datetime)
181+
(cond
182+
(= prop-type :datetime)
178183
(if-let [formatted (format-datetime value)]
179184
[formatted]
180185
(content->nodes value (:uuid->title ctx) (:graph-uuid ctx)))
186+
187+
:else
181188
(content->nodes value (:uuid->title ctx) (:graph-uuid ctx)))
182189

183190
(keyword? value)

0 commit comments

Comments
 (0)