Module:Sandbox/Evad37/X1

From blackwiki
< Module:Sandbox
Revision as of 14:42, 19 June 2020 by blackwiki>Evad37 (preprocess content)
Jump to navigation Jump to search

Tests

{{#invoke:Sandbox/Evad37/X1|main}} → Module:Sandbox/Evad37/X1

Lua error: callParserFunction: function "#coordinates" was not found.

Lua error: callParserFunction: function "#coordinates" was not found.

Template:WikidataCoord

{{#invoke:Sandbox/Evad37/X1|getCoords}}

Script error: The function "getCoords" does not exist.


-- This module is a sandbox. It is also used for testing XFDcloser

local p = {}

p.main = function(frame) 
	local childFrame = frame:newChild{ title = "Sandbox", args = {} }
	local FULLPAGENAME = childFrame:preprocess( "{{FULLPAGENAME}}" )
	return FULLPAGENAME
end

p.content = function(frame)
	local parent = frame:getParent()
	local title = mw.title.getCurrentTitle()
	local content = frame:preprocess(title:getContent())
	return frame:preprocess("<pre>" .. content .. "</pre>")
end

return p