aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/muwiki/links.lua5
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'