Module:Tone superscript

local p = {}

function p.main(frame) local root = mw.html.create local arg = frame:getParent.args[1] or "" local x = arg:gsub("(%d)", "%1"):gsub("(%d) %*(%d)", "%1*%2"):gsub(" ([%d%*]+) ", "%1") root:tag('span'):wikitext(x) local tracking = '' if string.match(arg, "") then tracking = '' end return tostring(root)..tracking end

return p