Jump to content

Module:Module wikitext: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Jackmcbarn (talk | contribs)
rework to support multiple calls and allow caching main
Jackmcbarn (talk | contribs)
typo
Line 4: Line 4:


function p.main()
function p.main()
return text
return p.text
end
end



Revision as of 17:43, 7 September 2020

local p = {}

p.text = ''

function p.main()
	return p.text
end

function p._addText(text, preprocessFrame)
	if preprocessFrame ~= false then
		text = (preprocessFrame or mw.getCurrentFrame()):preprocess(text)
	end
	p.text = p.text .. text
end

return p