From bdf8cf6ecd52e1a2e0ffbe1c8a9da8a9178882d6 Mon Sep 17 00:00:00 2001 From: moxie Date: Mon, 16 Mar 2026 03:16:17 +0200 Subject: fix: case-insensitive protocol matching for links --- lua/muwiki/links.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lua/muwiki/links.lua') diff --git a/lua/muwiki/links.lua b/lua/muwiki/links.lua index 2213dae..9ae22bd 100644 --- a/lua/muwiki/links.lua +++ b/lua/muwiki/links.lua @@ -25,10 +25,11 @@ local function is_text_extension(ext) end local function get_link_type(target) - if target:match('^https?://') then + local lowered = target:lower() + if lowered:match('^https?://') then return 'web' end - if target:match('^file://') then + if lowered:match('^file://') then return 'file' end return 'wiki' -- cgit v1.2.3