Module:Template link general: Difference atween revisions
Content deleted Content added
uh, string 10? |
s 1 reveesion importit fae en:Module:Template_link_general |
||
(14 intermeediate reveesions bi 5 uisers no shawn) | |||
Line 52:
if not _ne(textPart) then
if titleObj ~= nil then
textPart = titleObj
else
-- redlink
Line 98:
-- Build the arguments
local textPart = ""
local textPartBuffer = ""
local val = args[i]
if val ~= nil then val = mw.text.unstripNoWiki(val) else break end▼
textPartBuffer = textPartBuffer .. '|'
if val ~= "" then
if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end▼
if _ne(args.nowiki) then
textPart = textPart .. '|' .. val▼
-- 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
end
▲ if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end
textPartBuffer = ""
end
i = i+1
end
-- final wrap
local ret = titlePart .. textPart
if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end
if _ne(args.a) then ret =
if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end
if code then
Line 124 ⟶ 132:
span:wikitext(ret)
--]]
if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end
return ret
end
|