mirror of https://github.com/docker/docs.git
Merge pull request #18330 from dvdksn/main
fix: use links with leading slash as-is
This commit is contained in:
commit
1b176a0a6b
|
@ -12,8 +12,8 @@
|
|||
></a
|
||||
>
|
||||
{{- else if (strings.HasPrefix $url "/") -}}
|
||||
{{/* absolute link, use absURL */}}
|
||||
<a class="link" href="{{ absURL $url }}">{{ .Text | safeHTML }}</a>
|
||||
{{/* absolute link, use url as-is */}}
|
||||
<a class="link" href="{{ $url }}">{{ .Text | safeHTML }}</a>
|
||||
{{- else -}}
|
||||
{{/* check if the file links to index.md */}}
|
||||
{{- if (strings.FindRE `([^_]|^)index.md` $url 1) -}}
|
||||
|
|
Loading…
Reference in New Issue