Permanently protected 個模組

模組:Jpingauto

出自維基百科,自由嘅百科全書
跳去導覽 跳去搵嘢
模組解[] [] [] []

用法請睇Template:Jpingauto/解

local p = {}

function p.main(frame)
	local root = mw.html.create()
	local arg = frame:getParent().args[1] or ""
	local x = arg:gsub("(%d)", "<sup>%1</sup>")
	x = x:gsub("(%d)</sup>%*<sup>(%d)", "%1*%2")
	x = x:gsub("<sup><sup>([%d%*]+)</sup></sup>", "<sup>%1</sup>")
	root:tag('span'):wikitext(x)
	local tracking = ''
	if string.match(arg, "</?sup>") then tracking = '[[Category:用咗sup標記嘅調號上標模]]' end
	return tostring(root)..tracking
end

return p