|
836 | 836 | s (if (and tag? (not (:hide-tag-symbol? config))) (str "#" s) s)] |
837 | 837 | (if (ldb/page? page-entity) |
838 | 838 | s |
839 | | - (block-title config page-entity {}))))] |
| 839 | + (block-title (assoc config :page-ref? true) page-entity {}))))] |
840 | 840 | page-component))]])) |
841 | 841 |
|
842 | 842 | (rum/defc popup-preview-impl |
|
1647 | 1647 | (media-link config url href label metadata full_text) |
1648 | 1648 |
|
1649 | 1649 | :else |
1650 | | - (->elem |
1651 | | - :a.external-link |
1652 | | - (cond-> |
1653 | | - {:href href |
1654 | | - :target "_blank"} |
1655 | | - title |
1656 | | - (assoc :title title)) |
1657 | | - (map-inline config label))))))) |
| 1650 | + (if (:node-ref-link-only? config) |
| 1651 | + [:span |
| 1652 | + (map-inline config label)] |
| 1653 | + (->elem |
| 1654 | + :a.external-link |
| 1655 | + (cond-> |
| 1656 | + {:target "_blank" |
| 1657 | + :href href} |
| 1658 | + title |
| 1659 | + (assoc :title title)) |
| 1660 | + (map-inline config label)))))))) |
1658 | 1661 |
|
1659 | 1662 | (declare ->hiccup inline) |
1660 | 1663 |
|
|
2414 | 2417 | (file-block/marker-cp block) |
2415 | 2418 | (file-block/priority-cp block)]) |
2416 | 2419 |
|
2417 | | - ;; highlight ref block (inline) |
| 2420 | + ;; highlight ref block (inline) |
2418 | 2421 | (when-not area? [(hl-ref)]) |
2419 | 2422 |
|
2420 | | - (conj |
2421 | | - (map-inline config block-ast-title) |
2422 | | - (when (= block-type :whiteboard-shape) [:span.mr-1 (ui/icon "whiteboard-element" {:extension? true})])) |
| 2423 | + (let [config' (cond-> config |
| 2424 | + (and (:page-ref? config) |
| 2425 | + (= 1 (count block-ast-title)) |
| 2426 | + (= "Link" (ffirst block-ast-title))) |
| 2427 | + (assoc :node-ref-link-only? true))] |
| 2428 | + (conj |
| 2429 | + (map-inline config' block-ast-title) |
| 2430 | + (when (= block-type :whiteboard-shape) [:span.mr-1 (ui/icon "whiteboard-element" {:extension? true})]))) |
2423 | 2431 |
|
2424 | | - ;; highlight ref block (area) |
| 2432 | + ;; highlight ref block (area) |
2425 | 2433 | (when area? [(hl-ref)]) |
2426 | 2434 |
|
2427 | 2435 | (when (and (seq block-ast-title) (ldb/class-instance? |
|
0 commit comments