diff options
| author | moxie <moxie@3kgcat.fi> | 2026-03-16 03:16:17 +0200 |
|---|---|---|
| committer | moxie <moxie@3kgcat.fi> | 2026-03-16 03:16:17 +0200 |
| commit | bdf8cf6ecd52e1a2e0ffbe1c8a9da8a9178882d6 (patch) | |
| tree | 34c99bbbb5ea878ac58088190f8c929ca99159ef /lua/muwiki/links.lua | |
| parent | 0d5557b5185916913f08215eb7d987d25d3e09e0 (diff) | |
fix: case-insensitive protocol matching for links
Diffstat (limited to 'lua/muwiki/links.lua')
| -rw-r--r-- | lua/muwiki/links.lua | 5 |
1 files changed, 3 insertions, 2 deletions
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' |
