Module:Numlinks: Difference between revisions

Ganaram inukshuk (talk | contribs)
m some cleanup
Tag: Manual revert
ArrowHead294 (talk | contribs)
m Wikitext debugger option
 
Line 139: Line 139:
function p.numlinks(frame)
function p.numlinks(frame)
local args = getArgs(frame)
local args = getArgs(frame)
local wtext = yesno(frame.args["wtext"] or args["wtext"])
-- Preprocess numeric input
-- Preprocess numeric input
Line 151: Line 152:
-- Create numbered navigation links
-- Create numbered navigation links
local result = p._numlinks(args)
local result = p._numlinks(args)
-- Debugger option to show Wikitext
if wtext then
result = "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>"
end


return result
return frame:preprocess(result)
end
end