Module:Sandbox/Eelworm/Junctions Explained

local p = local getArgs = require ('Module:Arguments').getArgs;

function p._junctions(args, frame) local ret = '

\n!header1\n!header2\n' local largs = local tot = local gargs = if (args["old"] or "no")

"yes" then gargs["old"] = "yes" ret = ret .. "!old exit number\n" end for _,arg in pairs(args) do if (arg

"

-") then table.insert(tot, largs) largs = else table.insert(largs, arg) end end table.insert(tot, largs) for _,tab in pairs(tot) do for k,v in pairs(gargs) do tab[k] = v end ret = ret .. "-\n" .. frame:expandTemplate .. "\n" end ret = ret .. "
\n" mw.log(ret) return retend

function p.junction(frame) local pargs = getArgs(frame:getParent) local args = getArgs(frame) local ret = "" ret = ret .. args[1] if args["old"]

"yes" then ret = ret .. "\n|" .. ret .. "\n|" .. ret else ret = ret .. "\n|" .. ret end return retend

function p.junctions(frame) local args = getArgs(frame) return p._junctions(args, frame)end

return p