Module:Lang-zh: Difference between revisions

Content deleted Content added
uncontroversial sync to sandbox per edit request (adds another possible romanization)
m added automatic tone superscript for Wade–Giles and Jyutping
Line 70:
["sl"] = true,
["poj"] = true,
}
 
local superscript = {
["j"] = true,
["w"] = true,
}
-- Categories for different kinds of Chinese text
Line 183 ⟶ 188:
-- italicise
val = "''" .. val .. "''"
end
if (superscript[part]) then
-- superscript
val = val:gsub("(%d)", "<sup>%1</sup>"):gsub("(%d)</sup>%*<sup>(%d)", "%1*%2"):gsub("<sup><sup>([%d%*]+)</sup></sup>", "<sup>%1</sup>")
end
-- add both to body