Content deleted Content added
use single declaration of params; spans seem not to be working properly so hopefully this is the cause |
try another thing; construct params in one go |
||
Line 107:
if (val ~= "") then
if (ISOlang[name]) then -- add language if needed
params = {["lang"] = ISOlang[name], ["xml:lang"] = ISOlang[name]}
val = mw.text.tag({name="span",attr=params, content=val})
elseif (name == "p") then -- italicise pinyin
Line 135 ⟶ 134:
if (c) then
if (c > "") then -- if there is treat it as Chinese
params = {["lang"] = ISOlang["c"], ["xml:lang"] = ISOlang["c"]}
c = mw.text.tag({name="span",attr=params, content=c})
return "[[" .. wlinks["c"] .. "|" .. labels["c"] .. "]]: " .. c .. cats["c"]
|