模組解[]
local p = {}

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

return p