Module:Test: Difference between revisions

From Elwiki
No edit summary
No edit summary
Line 1: Line 1:
local p = {}
local p = {}
function p.main(frame)
function p.main(frame)
     local passive = frame:preprocess("{{:Dark Force}}{{#arrayindex:dark_force|0}}, {{#arrayindex:dark_force|1}}")
     local passive = frame:preprocess("{{:Dark Force}}")
     if string.match(passive, "%d%.%d,%s%d%.%d") then
     if string.match(passive, "%d%.%d,%s%d%.%d") then
         return 'matched'
         return 'matched'

Revision as of 12:10, 3 April 2022

Documentation for this module may be created at Module:Test/doc

local p = {}
function p.main(frame)
    local passive = frame:preprocess("{{:Dark Force}}")
    if string.match(passive, "%d%.%d,%s%d%.%d") then
        return 'matched'
    else
        return passive
    end
end
return p