Jump to content

Module:Expand wikitext

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pppery (talk | contribs) at 21:51, 21 September 2017 (Do code expansion in parent frame, to allow features like {{preprocess|<nowiki>{{{a}}}</nowiki>|a=5}}). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}
local yesno = require("Module:Yesno")
function p.main(frame)
	local pframe = frame:getParent()
	local code = frame.args[1]
	if mw.text.trim(mw.text.killMarkers(code)) == "" or yesno(frame.args.unstrip) then
		code = mw.text.unstripNoWiki(code);
	end
	return pframe:preprocess(code)
end

return p