Skip to content

Commit

Permalink
not replace space with dash in external url
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosarium committed Dec 19, 2023
1 parent e2da4c5 commit 728d420
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/_default/_markup/render-link.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{$dashedurl := replace .Destination "%20" "-" }}
<!-- {{$dashedurl := replace .Destination "%20" "-" }} -->
<!-- workaround: not have dashed url for external -->
{{$dashedurl := .Destination }}
{{$external := strings.HasPrefix $dashedurl "http" }}
{{- if $external -}}
<a href="{{ $dashedurl }}" rel="noopener">{{ .Text | safeHTML }}</a>
Expand Down

0 comments on commit 728d420

Please sign in to comment.