Allows the source to be highlighted when coming from a highlighted

This commit is contained in:
dtonon
2025-04-03 22:14:14 +02:00
parent 314b7a24e7
commit f1261d2919

View File

@@ -37,7 +37,7 @@ templ highlightInnerBlock(params HighlightPageParams) {
}
<cite class="ml-2">
if params.HighlightEvent.SourceURL != "" {
<a href={ templ.SafeURL(params.HighlightEvent.SourceURL) }>{ params.HighlightEvent.SourceName }</a>
<a href={ templ.SafeURL(params.HighlightEvent.SourceURL + "#:~:text=" + string(params.Content)) }>{ params.HighlightEvent.SourceName }</a>
}
if params.HighlightEvent.SourceEvent != "" {
<a href={ templ.SafeURL("/" + params.HighlightEvent.SourceEvent) }>{ params.HighlightEvent.SourceName }</a>