Module:Rubi

-- local p = {} local param = { rpStart = "rpStart", rpEnd = "rpEnd", } function mobileTag(ruby,text) if text then ruby:tag('rp') :wikitext(text) :done end end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {		parentFirst = true,		wrappers = {			'Template:Rubi'		},	}) return p._main(args) end function p._main(args) local ruby = mw.html.create('ruby') if args.large then ruby:css("font-size","250%") end for k,v in ipairs(args) do		if k % 2 == 0 then mobileTag(ruby,args[param.rpStart]) local rt = ruby:tag('rt') :wikitext(v) if args.large then rt:css("font-size","small") end rt:done mobileTag(ruby,args[param.rpEnd]) else ruby:wikitext(v) end end return tostring(ruby) end

return p