Module:Template link general: Difference between revisions

update code - remove trailing blank parameters
m (1 revision imported)
(update code - remove trailing blank parameters)
Line 98:
-- Build the arguments
local textPart = ""
local textPartBuffer = ""
local i = 2
while args[i] do
local val = args[i]
if val ~= nil then val = mw.text.unstripNoWiki(val) else break end
textPartBuffer = textPartBuffer .. '|'
if _ne(args.nowiki) then val = nw(val) end
if val ~= "" then
if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end
if _ne(args.nowiki) then val = nw(val) end
textPart = textPart .. '&#124;' .. val
if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end
textPart = textPart .. '&#124;'textPartBuffer .. val
textPartBuffer = ""
end
i = i+1
end
 
-- final wrap
local ret = titlePart .. textPart
Anonymous user