Jump to content

Module:Sandbox/Kephir: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Line 2: Line 2:
-- do not expect anything to stay here in place
-- do not expect anything to stay here in place


return setmetatable({}, { __index = {
return {
do_it = function (frame)
pagename = function (frame)
return frame:preprocess("{{PAGENAME}}")
local output = {}
end;
local strip_marker = frame:preprocess("{{Special:PrefixIndex/User:Mr. Stradivarius}}")
}
for link in mw.text.unstrip(strip_marker):gmatch([[<a href="/wiki/(.-)"]]) do
table.insert(output, "* [[" .. mw.uri.decode(link, "WIKI") .. "]]")
end
return #output .. " pages.\n" .. table.concat(output, "\n") ..
"\nstrip marker:<pre>" .. strip_marker:gsub("\127", "&#x2421;") .. "</pre>" ..
"strip marker contents:<pre>" .. mw.text.unstrip(strip_marker) .. "</pre>"
end,
} })

Revision as of 17:05, 7 January 2014

-- [[User:Kephir]]'s Scribunto sandbox
-- do not expect anything to stay here in place

return {
	pagename = function (frame)
		return frame:preprocess("{{PAGENAME}}")
	end;
}