1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
local config = require 'config' function Link(link) if link.target:match("^[%w]+://") then return link end for _, ext in pairs(config.EXTENSIONS) do link.target = link.target:gsub("%."..ext.."$", ".html") end return link end