Module:Template link general: Difference between revisions
Jump to navigation
Jump to search
>Primefac (remove parameter limit) |
mf>Primefac (implement sandbox fix for nowiki issues (TPER)) |
||
Line 98: | Line 98: | ||
-- Build the arguments | -- Build the arguments | ||
local textPart = "" | local textPart = "" | ||
local textPartBuffer = "" | |||
local i = 2 | local i = 2 | ||
while args[i] do | while args[i] do | ||
local val = args[i] | local val = args[i] | ||
if val ~= | 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 | i = i+1 | ||
end | end | ||
-- final wrap | -- final wrap | ||
local ret = titlePart .. textPart | local ret = titlePart .. textPart |