Module:Mbox

local Mbox = {} local getArgs = require('Dev:Arguments').getArgs function Mbox.main(frame) local f = getArgs(frame) local container = mw.html.create('table') :addClass('mbox') if f[1] and mw.text.trim(f[1]) == 'SD' then container:addClass('SD') end local firstrow = container:tag('tr') local imagetd = firstrow:tag('td') :attr('rowspan', '2') :addClass('image') :wikitext('') local characterquote = mw.html.create('span') :addClass('quote') :wikitext(f['characterquote']) local characterlinktext = f['characterlink'] or f['character'] local quotetd = firstrow:tag('td') :addClass('mbox-quote') :wikitext('' .. characterlinktext .. ': '):node(characterquote) local secondrow = container:tag('td') local text = secondrow:wikitext(f['text']) return container end return Mbox