From cd8943a3f9e0cbdfe02bdfcdc0393946c9265731 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Mon, 11 Nov 2019 22:04:20 +0100 Subject: Fix: Correctly handle URIs where the type is not separated by a slash --- template.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'template.go') diff --git a/template.go b/template.go index f58349e..7aee61a 100644 --- a/template.go +++ b/template.go @@ -43,6 +43,11 @@ var tpltext = ` {{ . }} {{- else -}} {{- $href = printf "%s/1" $href -}} + {{- $part = $part | trimLeftChar -}} + {{- if not (eq $part "") -}} + {{- $href = printf "%s/%s" $href $part -}} + /{{ $part }} + {{- end -}} {{- end -}} {{- end -}} {{- if ne (len $uriParts) 0 -}} -- cgit v1.2.3-54-g00ecf