Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Test: Difference between revisions

From ProleWiki, the proletarian encyclopedia
m (Using tostring before)
m (Not sure why it won't work, testing something else)
Line 2: Line 2:
function p.test( frame )
function p.test( frame )
local pageContent = tostring(mw.title.getCurrentTitle():getContent())
local pageContent = tostring(mw.title.getCurrentTitle():getContent())
local pagesLines = mw.text.split(pageContent,'%s')
local pagesLines = ''
return pageLines[1]
return mw.text.split(pageContent,'%s')[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 = ''
	return mw.text.split(pageContent,'%s')[1]
end
return p