mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 08:25:32 +00:00
* Remove unused context/menu_*.md files * Move build-help.sh and htmllink.lua out of android/help/ * Update build scripts and README accordingly
18 lines
467 B
Lua
18 lines
467 B
Lua
function Link(elem)
|
|
if isLocalLink(elem) then
|
|
if isFolderLink(elem) then
|
|
return pandoc.Link(elem.content, elem.target .. 'index.html', elem.title, elem.attr)
|
|
else
|
|
return pandoc.Link(elem.content, elem.target .. '.html', elem.title, elem.attr)
|
|
end
|
|
end
|
|
return elem
|
|
end
|
|
|
|
function isLocalLink(elem)
|
|
return string.match(elem.target, "://") == nil
|
|
end
|
|
|
|
function isFolderLink(elem)
|
|
return not ( string.match(elem.target, "/$") == nil )
|
|
end
|