Module:CodeToText
Appearance
Documentation for this module may be created at Module:CodeToText/doc
local p = {}
function p.test(frame)
local pageName = frame.args.page or 'Module:Sandbox'
local titleObj = mw.title.new(pageName)
if not titleObj then
return "Failed to create mw.title object for '" .. pageName .. "'"
end
local content = titleObj:getContent()
if not content then
return "No content for '" .. pageName .. "'"
end
return content
end
return p