Módulo:CapiuntoTest

Revisão de 22h10min de 6 de novembro de 2023 por Davioitu (discussão | contribs)

local p = {}

function p.run(frame)
  local capiunto = require 'capiunto'
  local args = {}
  for i = 1, #frame.args do
    args[i] = frame.args[i]
  end
  local table = capiunto.create( {
    title = tostring(mw.title.getCurrentTitle()),
    top = 'Above text',
    topStyle = 'background:#cfc;',
    bottom = 'Below text'
  } )
  for i = 3, 2 + #args do
    table:addRow(args[i], args[i + 1])
  end
  return table
end

return p