local getArgs = require('Module:Arguments').getArgs
local split = require('Module:Split2').split
local ch = require('Module:MadokaRuneChar')
local p = {}
local function toWikitext(text1)
return mw.getCurrentFrame():preprocess(text1)
end
function p.main(frame)
local args = getArgs(frame)
return p._main (frame, args)
end
function p._main(frame, args)
if (not frame) then
frame = mw.getCurrentFrame()
end
local tmp = split(args[1])
local style = (args[2] or ''):gsub('^%s*(.-)%s*$', '%1')
local sz = args['size'] or args[3] or nil
local link = args['link'] or ''
R = '<span class="runes" title="'.. args[1] .. '" style="display:inline-block">'
for k, v in ipairs(tmp.parts) do
t = ch._main(frame, {
[1] = v,
[2] = style,
size = sz,
link = link
})
R = R .. t
end
R = R .. '</span>'
return R
end
return p