2021-10-20 19:35:46 +00:00
|
|
|
function Link(el)
|
2022-01-10 21:28:43 +00:00
|
|
|
el.target = string.gsub(el.target, "file:///bin/.*", "../cant-run-application.html")
|
|
|
|
el.target = string.gsub(el.target, "help://man/([^/]*)/(.*)", "../man%1/%2.html")
|
2021-10-20 19:35:46 +00:00
|
|
|
return el
|
|
|
|
end
|
2022-01-17 09:43:28 +00:00
|
|
|
|
|
|
|
function Image(el)
|
2022-05-28 23:52:58 +00:00
|
|
|
-- HACK: Handle images that are not icons separately; they're copied manually in the
|
|
|
|
-- Meta/build-manpages-website.sh script.
|
|
|
|
-- Ideally this would be generalized so the paths export below could handle both.
|
|
|
|
if el.src:find("^/res/icons/") == nil then
|
|
|
|
el.src = "../" .. el.src
|
|
|
|
return el
|
|
|
|
end
|
|
|
|
|
2022-01-17 09:43:28 +00:00
|
|
|
local pattern = "/res/icons/(.*)"
|
|
|
|
local image = string.gsub(el.src, pattern, "%1")
|
|
|
|
|
|
|
|
el.src = "../icons/" .. image
|
|
|
|
file = io.open("icons.txt", "a+")
|
|
|
|
file:write(image .. "\n")
|
|
|
|
file:close()
|
|
|
|
return el
|
|
|
|
end
|