Jump to content

Module:Sandbox/Alex 21

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Alex 21 (talk | contribs) at 02:30, 31 December 2018 (Alex 21 moved page Module:Sandbox/AlexTheWhovian to Module:Sandbox/Alex 21 without leaving a redirect: Move after rename). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

local function getTitle(title)
	local success, titleObj = pcall(mw.title.new, title)
	if success then return titleObj
	else return nil end
end

function p.main(frame)
	local args = require('Module:Arguments').getArgs(frame, {frameOnly = true})
	
	local content = string.gsub(getTitle(args[1]):getContent() or "", "[\r\n]", "")
	
	return content
end

return p