"ഘടകം:TaxonItalics" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം

Content deleted Content added
No edit summary
No edit summary
വരി 6:
local name = frame.args[1] or ''
local result = name
local italbegin = "''"
local italend = "''"
if name ~= '' then
if string.sub(name, 1, 2) == "''" or string.sub(name, 1, 2) == "<i>" then
Line 12 ⟶ 14:
local words = mw.text.split(name, " ", true)
if #words ~= 4 then
result = "<i>"italbegin .. name .. "</i>"italend
elseif string.find(name, "''", 1, true) or string.find(name, "<i>", 1, true) then
result = "<i>"italbegin .. name .. "</i>"italend
else
-- test here for words[3] being connecting term
if words[3] == "subsp." or words[3] == "var." or words[3] == "subvar." or words[3] == "f." or words[3] == "subf." then
result = "<i>"italbegin .. words[1] .. " " .. words[2] .. italend .. "</i> " .. words[3] .. " <i>" .. italbegin .. words[4] .. "</i>"italend
else
result = "<i>"italbegin .. name .. "</i>"italend
end
end
"https://ml.wikipedia.org/wiki/ഘടകം:TaxonItalics" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്