More languages
More actions
m (I think it doesn't ignore empty lines, which is something to consider) |
m (Testing length operator) |
||
Line 3: | Line 3: | ||
local pageContent = tostring(mw.title.getCurrentTitle():getContent()) | local pageContent = tostring(mw.title.getCurrentTitle():getContent()) | ||
local pageLines = mw.text.split(pageContent,'\n',true) | local pageLines = mw.text.split(pageContent,'\n',true) | ||
return pageLines | return #pageLines | ||
end | end | ||
return p | return p |