diff --git a/components/match2/wikis/warcraft/legacy/legacy_match_maps.lua b/components/match2/wikis/warcraft/legacy/legacy_match_maps.lua index 674b3fa7d57..2d184b6facd 100644 --- a/components/match2/wikis/warcraft/legacy/legacy_match_maps.lua +++ b/components/match2/wikis/warcraft/legacy/legacy_match_maps.lua @@ -15,7 +15,6 @@ local Logic = require('Module:Logic') local Match = require('Module:Match') local MatchGroup = require('Module:MatchGroup') local PageVariableNamespace = require('Module:PageVariableNamespace') -local String = require('Module:StringUtils') local Table = require('Module:Table') local Template = require('Module:Template') @@ -121,7 +120,9 @@ function LegacyMatchMaps._readMaps(args) for mapIndex = 1, MAX_NUM_MAPS do local prefix = 'map' .. mapIndex - local map = Table.filterByKey(args, function(key) return String.startsWith(key, prefix) end) + local map = Table.filterByKey(args, function(key) + return key == prefix or string.find(key, '^' .. prefix .. '[^%d]') + end) map = Table.map(map, function(key, value) args[key] = nil