Module:Testcase table: Difference between revisions

Content deleted Content added
No edit summary
per request on the talk page
Line 11:
local heading1 = args['_heading1'] or '{{[[Template:' .. template1 .. '|' .. template1 ..']]}}'
local heading2 = args['_heading2'] or '{{[[Template:' .. template2 .. '|' .. template2 ..']]}}'
local heading0 = ''
local rowheader = ''
local caption = args['_caption'] or 'Side by side comparison'
local t = {}
if( args['_rowheader'] ) then
rowheader = '<td scope=row>' .. args['_rowheader'] .. '</td>'
if( args['_heading0'] ) then
heading0 = '<th>' .. heading0 .. '</th>'
end
end
for k, v in pairs(args) do
Line 20 ⟶ 29:
return mw.ustring.format( [==[
<table><caption>%s</caption>
<tr>%s<th style="width:50%%">%s</th><th style="width:50%%">%s</th></tr>
<tr style="vertical-align:top">%s<td>
%s</td><td>
%s</td></tr></table>]==],
caption,
heading0, heading1, heading2, rowheader,
frame:expandTemplate{ title = template1, args = t },
frame:expandTemplate{ title = template2, args = t }