Module:Parameter names example: Difference between revisions

Content added Content deleted
m (fix typo)
(Adding a "plain" _display option via plain(s) and extra conditional in p._main seems to work but I imagine there's something more elegant)
Line 11: Line 11:
local function italicize(s)
local function italicize(s)
return "''" .. s .. "''"
return "''" .. s .. "''"
end

local function plain(s)
return s
end
end


Line 19: Line 23:
formatFunc = italicize
formatFunc = italicize
else
else
if args._display == 'plain' then
formatFunc = makeParam
formatFunc = plain
else
formatFunc = makeParam
end
end
end