Module:Lang-zh: Difference between revisions

Content deleted Content added
per edit request; adds Tâi-lô romanization support
per talk
Line 236:
elseif (part == "l") then
local terms = ""
-- put individual, potentially comma-separated glosses in single- quotes
-- (first strip leading and trailing whitespace and quotes, including bold/italic markup)
for term in val:gmatch("[^;,]+") do
term = stringmw.gsubtext.trim(term, "^([ %s\"']*)(.*?)([ \"']*)$", "%2")
terms = terms .. "'" .. term .. "', "
end
Line 244 ⟶ 245:
elseif (part == "tr") then
-- put translations in double quotes
-- (first strip leading and trailing spaces and quotes, including bold/italic markup)
val = mw.text.trim(val, "%s\"'")
val = """ .. val .. """
end