mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
enhance: published page shows tags prefixed
with '#' like in app. Affects block and page tags
This commit is contained in:
9
deps/publish/src/logseq/publish/render.cljs
vendored
9
deps/publish/src/logseq/publish/render.cljs
vendored
@@ -259,14 +259,15 @@
|
||||
(or (get name->uuid name)
|
||||
(get name->uuid (common-util/page-name-sanity-lc name))))
|
||||
|
||||
(defn entity->link-node
|
||||
[entity ctx]
|
||||
(defn- entity->link-node
|
||||
[entity ctx prop-key]
|
||||
(let [title (publish-model/entity->title entity)
|
||||
uuid (:block/uuid entity)
|
||||
graph-uuid (:graph-uuid ctx)]
|
||||
(cond
|
||||
(and uuid graph-uuid (publish-model/page-entity? entity))
|
||||
[[:a.page-ref {:href (str "/page/" graph-uuid "/" uuid)} title]]
|
||||
[[:a.page-ref {:href (str "/page/" graph-uuid "/" uuid)}
|
||||
(str (when (= prop-key :block/tags) "#") title)]]
|
||||
(common-util/url? title)
|
||||
[[:a {:href title} title]]
|
||||
:else
|
||||
@@ -313,7 +314,7 @@
|
||||
(and ref-type? (get entities value))
|
||||
(let [entity (get entities value)]
|
||||
(with-icon (:logseq.property/icon entity)
|
||||
(entity->link-node entity ctx)))
|
||||
(entity->link-node entity ctx prop-key)))
|
||||
|
||||
:else
|
||||
[(str value)])
|
||||
|
||||
Reference in New Issue
Block a user