Module:Template link general: Difference between revisions

looks like nowiki logic got inverted
mNo edit summary
(looks like nowiki logic got inverted)
Line 102: Line 102:
local val = args[ii]
local val = args[ii]
if val ~= nil then val = mw.text.unstripNoWiki(val) else break end
if val ~= nil then val = mw.text.unstripNoWiki(val) else break end
if not _ne(args.nowiki) then val = nw(val) end
if _ne(args.nowiki) then val = nw(val) end
if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end
if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end
textPart = textPart .. '&#124;' .. val
textPart = textPart .. '&#124;' .. val
Line 111: Line 111:
local ret = titlePart .. textPart
local ret = titlePart .. textPart
if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end
if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end
if _ne(args.a) then ret = mw('*') .. '&nbsp;' .. ret end
if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end
if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end
if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end
if code then
if code then
Line 124: Line 124:
span:wikitext(ret)
span:wikitext(ret)
--]]
--]]
if _ne(args.debug) then ret = ret .. '<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end
if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end
return ret
return ret
end
end


return p
return p
Anonymous user