Module:Toyama
Documentation for this module may be created at Module:Toyama/doc
local getArgs = require('Module:Arguments').getArgs;
local defArgs = require('Module:Arguments').defaultArgs;
local toyama = {};
function toyama.func1( frame )
local args = defArgs(getArgs(frame), 1, "");
local arg = args[1];
local text = ""
for line in arg:gmatch("[%S ]+") do
text = text .. line
end
return text
end
function toyama.vbar( frame )
local args = defArgs(getArgs(frame), 1, "");
local arg = args[1];
local text = ""
local label = ""
local data = ""
for i,j in arg:gmatch("&&([%S ]+)&&([-.0-9]+)") do
label = label .. "," .. i
data = data .. "," .. j
end
label = string.sub(label,1)
data = string.sub(data,1)
text = text .. "label=" .. label .. ";data=" .. string.sub(data,2)
return text
end
return toyama