her.esy.fun/engine/links-to-html.lua

9 lines
284 B
Lua
Raw Normal View History

2021-09-20 12:09:52 +00:00
-- links-to-html.lua
function Link(el)
2024-07-25 21:58:42 +00:00
-- this if is necessary to not match .org domains, but only .org files.
if (not (string.match(el.target, "https?://"))) then
el.target = string.gsub(string.gsub(el.target, "%.org", ".html"), "%.html::", ".html#" )
end
2021-09-20 12:09:52 +00:00
return el
end