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

Content deleted Content added
Created page with 'local p = {} --[[========================================================================= =====================================================================...'
(വ്യത്യാസം ഇല്ല)

09:10, 8 ഫെബ്രുവരി 2018-നു നിലവിലുണ്ടായിരുന്ന രൂപം

ഈ ഘടകത്തിന്റെ വിവരണം ഘടകം:TaxonItalics/വിവരണം എന്ന താളിൽ നിർമ്മിക്കാവുന്നതാണ്

local p = {}

--[[=========================================================================
=============================================================================]]
function p.italicizeTaxonName()
	local name = frame.args[1] or ''
	local result = ''
	if name ~= '' then
		if string.find(name, "''", 1, true) or string.find(name, "<i>", 1, true) then
			result = name
		else
			local words = mw.text.split(name, " ", true)
			if #words ~= 4 then
				result = "<i>" .. name .. "</i>"
			else
				-- need test here for words[3] being connecting term
				result = "<i>" .. words[1] .. " " .. words[2] .. "</i> " .. words[3] .. " <i>" .. words[4] .. "</i>"
			end
		end
	end
	return result
end

return p
"https://ml.wikipedia.org/w/index.php?title=ഘടകം:TaxonItalics&oldid=2875656" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്