Module:Tone superscript: Difference between revisions

Content deleted Content added
mNo edit summary
mNo edit summary
Line 3:
function p.main(frame)
local root = mw.html.create()
local arg = frame:getParent().args[1] or ""
if not arg or arg:len() == 0 then
root:tag('strong'):attr('class','error'):wikitext('Error: No input.')
return tostring(root)
end
local x = arg:gsub("(%d)", "<sup>%1</sup>")
x = x:gsub("(%d)</sup>%*<sup>(%d)", "%1*%2")