Module:Test: Difference between revisions
From Elwiki
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
local p = {} | local p = {} | ||
function p.main(frame) | function p.main(frame) | ||
local passive1 = ' | local passive1 = 'Dark Force' | ||
if string.match(passive1, "%d%.%d,%s%d%.%d") then | if string.match(passive1, "%d%.%d,%s%d%.%d") then | ||
return 'first index: ' .. split(passive1)[1] .. 'second index: ' .. split(passive1)[2] | return 'first index: ' .. split(passive1)[1] .. 'second index: ' .. split(passive1)[2] |
Revision as of 14:08, 3 April 2022
Documentation for this module may be created at Module:Test/doc
require('Module:CommonFunctions')
local p = {}
function p.main(frame)
local passive1 = 'Dark Force'
if string.match(passive1, "%d%.%d,%s%d%.%d") then
return 'first index: ' .. split(passive1)[1] .. 'second index: ' .. split(passive1)[2]
else
return frame:preprocess('{{:' .. passive1 .. '}}{{#arrayprint:' .. passive1 .. '}}')
end
return passive
end
return p