From 4a0417b4b04f59fa1105ee2a1f7b0e6425d6f349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Mon, 30 Oct 2023 19:05:59 +0100 Subject: [PATCH] links: ignore local markdown links linking to files with extension #707 --- layouts/partials/shortcodes/link.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/shortcodes/link.html b/layouts/partials/shortcodes/link.html index 9e0817a144..0b1af52d88 100644 --- a/layouts/partials/shortcodes/link.html +++ b/layouts/partials/shortcodes/link.html @@ -18,7 +18,7 @@ {{- end }} {{- else }} {{- $url = urls.Parse $url }} - {{- if and $url.Path (not (strings.HasSuffix $url.Path ".html")) (not (strings.HasSuffix $url.Path ".md")) }} + {{- if and $url.Path (not (path.Ext $url.Path)) }} {{- /* ignore old style links with given extension */}} {{- $found := false }} {{- $fragment := "" }}