No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
local output = "{{#tag:tabber|" |
local output = "{{#tag:tabber|" |
||
for match in string.gmatch(args[1],"File:[^%c]*") do |
for match in string.gmatch(args[1],"File:[^%c]*") do |
||
− | local split = mw.text.split(match, " |
+ | local split = mw.text.split(match, "|", true) |
local file = split[1] or '' |
local file = split[1] or '' |
||
local desc = split[2] or '' |
local desc = split[2] or '' |
Revision as of 13:23, 8 September 2019
Documentation for this module may be created at Module:SlidesToTabber/doc
local p = {}
p.main = function(f)
local args = f:getParent().args
if args[1] == nil then
return ""
end
local output = "{{#tag:tabber|"
for match in string.gmatch(args[1],"File:[^%c]*") do
local split = mw.text.split(match, "|", true)
local file = split[1] or ''
local desc = split[2] or ''
output = output .. "\n{{!}}-{{!}}\n "..desc.."=\n[["..file.."|250px]]"
end
output = output .. "\n}}"
return output
end
return p