385
edits
m (Changed protection level for "Module:Template link general": High-risk Lua module: Used by Template:Template link expanded ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))) |
m (7 revisions imported from wikipedia:Module:Template_link_general: see Topic:Vtixlm0q28eo6jtf) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 98: | Line 98: | ||
-- Build the arguments | -- Build the arguments | ||
local textPart = "" | local textPart = "" | ||
local textPartBuffer = "" | |||
local i = 2 | |||
local val = args[ | while args[i] do | ||
if val ~= | local val = args[i] | ||
textPartBuffer = textPartBuffer .. '|' | |||
if val ~= "" then | |||
if _ne(args.nowiki) then | |||
-- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will | |||
-- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up | |||
val = nw(mw.text.unstripNoWiki(val)) | |||
end | |||
if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end | |||
textPart = textPart .. textPartBuffer .. val | |||
textPartBuffer = "" | |||
end | |||
i = i+1 | |||
end | end | ||
-- final wrap | -- final wrap | ||
local ret = titlePart .. textPart | local ret = titlePart .. textPart |