Module:Infobox: Difference between revisions

82 bytes added ,  10 years ago
remove extra newline from the below row, use a div tag instead of a span tag for image captions, per talk
(fix phantom reference bug)
(remove extra newline from the below row, use a div tag instead of a span tag for image captions, per talk)
Line 116:
.newline()
.wikitext(args.below)
.newline()
end
 
Line 129 ⟶ 128:
for k, num in ipairs(subheadernums) do
addRow({
data = args['subheader' .. tostring(num)],
datastyle = args.subheaderstyle or args['subheaderstyle' .. tostring(num)],
class = args.subheaderclass,
rowclass = args['subheaderrowclass' .. tostring(num)]
})
end
Line 146 ⟶ 145:
local imagenums = getArgNums('image')
for k, num in ipairs(imagenums) do
local caption = args['caption' .. tostring(num)]
local data = HtmlBuilder.create().wikitext(args['image' .. tostring(num)])
if caption then
data
.tag('br', {selfClosing = true})
.done()
.tag('spandiv')
.cssText(args.captionstyle)
.wikitext(caption)
Line 160 ⟶ 159:
datastyle = args.imagestyle,
class = args.imageclass,
rowclass = args['imagerowclass' .. tostring(num)]
})
end
Line 172 ⟶ 171:
for k, num in ipairs(rownums) do
addRow({
header = args['header' .. tostring(num)],
label = args['label' .. tostring(num)],
data = args['data' .. tostring(num)],
datastyle = args.datastyle,
class = args['class' .. tostring(num)],
rowclass = args['rowclass' .. tostring(num)]
})
end
Anonymous user