Module: Layout wiring standard

DCCWiki, a community DCC encyclopedia.
Jump to: navigation, search

Documentation for this module may be created at Module:Layout wiring standard/doc

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

function p.main(frame)
	local args = getArgs(frame)

  local output = '{| class="table"\n! Purpose \n! Color \n! Notes \n'
  for k, v in pairs( args ) do
    output = output .. '|-\n|' .. k .. '\n'
    myTable = mw.text.split(v, '*')
    for toss, tablesection in ipairs(myTable) do
      output = output .. '|' .. tablesection .. '\n'
    end

  end
  output = output .. '\n|}'
  return output
end

return p