Module:Test: Difference between revisions

From ProleWiki, the proletarian encyclopedia
m (Using separator category instead of \n)
m (Using tostring before)
Line 1: Line 1:
local p = {}
local p = {}
function p.test( frame )
function p.test( frame )
local pageContent = mw.title.getCurrentTitle():getContent()
local pageContent = tostring(mw.title.getCurrentTitle():getContent())
local pagesLines = mw.text.split(pageContent,'%s')
local pagesLines = mw.text.split(pageContent,'%s')
return pageLines[1]
return pageLines[1]
end
end
return p
return p

Revision as of 17:36, 14 April 2024

local p = {}
function p.test( frame )
	local pageContent = tostring(mw.title.getCurrentTitle():getContent())
	local pagesLines = mw.text.split(pageContent,'%s')
	return pageLines[1]
end
return p