--p =
function p.main(frame) local routes, tmp, result = frame.args[1] or ,, for k, v in ipairs do if mw.ustring.find(routes, v) then tmp[v] = true routes = mw.ustring.gsub(routes, v, ) end end for k, v in ipairs do if mw.ustring.find(routes, v) then tmp[v] = true end end for k, v in ipairs do if tmp[v] then table.insert(result, v) end end if #result > 1 then return 'routes '..mw.text.listToText(result) end if #result > 0 then return 'route '..mw.text.listToText(result) endend
return p