Jump to content

Module:Preprocessing

From Wikipedia

Documentation for this module may be created at Module:Preprocessing/doc

local p = {}

function p._format( text )
	return "----\n" .. text .. "\n----\n"
end

function p.printText( text )
	return p._format( text )
end

function p.printFrame( frame )
	local moduleArgs = frame.args
	return p._format( moduleArgs[1] )
end

function p.printTextPreprocess( text )
	return mw.getCurrentFrame():preprocess( p._format( text ) )
end

function p.printFramePreprocess( frame )
	local moduleArgs = frame.args
	return frame:preprocess( p._format( moduleArgs[1] ) )
end

return p