Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Jump to content

Module:Template link general and Module:Template link general/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
put subst on if nolink
 
make for subst when nolink
 
Line 1: Line 1:
-- This implements Template:Template link general and various other templates in its family
-- This implements [[Template:Template link general]] and various other templates in its family
local getArgs = require('Module:Arguments').getArgs
local getArgs = require('Module:Arguments').getArgs
local p = {}
local p = {}
Line 35: Line 35:
if _ne(args.nolink) then
if _ne(args.nolink) then
if _ne(args.subst) then
if _ne(args.subst) then
-- HACK: the ns thing above is probably broken
return 'subst:' .. args['1']
return 'subst:' .. args['1']
else
else
Line 141: Line 142:
ret = '<code>' .. ret .. '</code>'
ret = '<code>' .. ret .. '</code>'
elseif _ne(args.plaincode) then
elseif _ne(args.plaincode) then
ret = '<code style="border:none;background:transparent;color:inherit">' .. ret .. '</code>'
ret = '<code style="border:none;">' .. ret .. '</code>'
end
end
if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end
if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end