5,083
edits
No edit summary |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
table.concat(fields, ','), query) | table.concat(fields, ','), query) | ||
local | if #images == 0 then | ||
return '' | |||
end | |||
local wikitext = '==' .. header .. '==\n' | |||
wikitext = wikitext .. '<gallery>\n' | |||
for _, img in ipairs(images) do | for _, img in ipairs(images) do | ||
wikitext = wikitext .. img.file .. '|' .. img.caption .. '\n' | |||
end | end | ||
wikitext = wikitext .. '</gallery>\n' | |||
return frame:preprocess(wikitext) | |||
end | end | ||
return p | return p |