Module:Article

--- Package for functions related to articles. -- -- @module	article -- @version	1.0 -- @see Module:Article/min local article = {}

function article.title(...) local sPage, sDisplay, aSub, sFormat = arg[1]['page'], arg[1]['display'], {}, '%s' if sDisplay ~= nil then if arg[1]['link'] then table.insert(aSub, sPage) if arg[1]['italic'] and not sDisplay:find("^''") then sFormat = "%s" else sFormat = "%s" end else if arg[1]['italic'] and not sDisplay:find("^") then sFormat = "%s''" end end

table.insert(aSub, sDisplay) else aSub = {sPage} if arg[1]['link'] then sFormat = "" .. sFormat .. "" end if arg[1]['italic'] then sFormat = "''" .. sFormat .. "''" end end

return string.format(sFormat, unpack(aSub)) end

return article