Module:Page: Difference between revisions

Content deleted Content added
pcall encapsulation is now provided by Module:Protect
args.as defaults to "pre"
Line 60:
function p.getContent(frame)
local args, pargs = frame.args, ( frame:getParent() or {} ).args or {}
local fmt = args.as or pargs.as or false"pre"
local text = main(frame, "getContent")
 
if not fmt then
return frame:preprocess( "<pre>" .. text .. "</pre>" )
end
 
fmt = mw.text.split( fmt, ", ?" )