aboutsummaryrefslogtreecommitdiff
path: root/lua/muwiki/external.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/muwiki/external.lua')
-rw-r--r--lua/muwiki/external.lua29
1 files changed, 0 insertions, 29 deletions
diff --git a/lua/muwiki/external.lua b/lua/muwiki/external.lua
index cf26aca..9ea83b5 100644
--- a/lua/muwiki/external.lua
+++ b/lua/muwiki/external.lua
@@ -27,33 +27,4 @@ function M.execute(handler, url)
end
end
-function M.matches(handler, url)
- local pattern = handler.pattern
-
- if pattern == nil then
- return true
- end
-
- if type(pattern) == 'string' then
- return url:match(pattern) ~= nil
- end
-
- for _, p in ipairs(pattern) do
- if url:match(p) then
- return true
- end
- end
- return false
-end
-
-function M.get_matching(url)
- local matching = {}
- for _, handler in ipairs(config.options.external_handlers) do
- if M.matches(handler, url) then
- table.insert(matching, handler)
- end
- end
- return matching
-end
-
return M