Module:Luadocs

-- Shows modules links in the list of global modules -- Syntxx :

local p = {} local getArgs = require("Dev:Arguments").getArgs local isMod = require("Dev:Existsmod").module_exists

function p.main local args = getArgs(frame) return p.module_exists(args[1], args["notests"]) end

function p.create_links(modName,noTests) local modDocs = 'Docs' local modLink = 'Source' local testPage = modName..'/testcases' local modTest = 'Tests' local docsOutput = modDocs..'·'..modLink if isMod(testPage,testPage) then docOutput = ' ['..tostring(mw.uri.fullUrl('Module:'..testPage)) ..'?action=edit&preload=Template:Moduletestcases add] ' docsOutput = docsOutput ..'·'..modTest end return docsOutput end

return p