Модуль:Сущность/data: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 342: | Строка 342: | ||
end | end | ||
local allowCardEntry = not isWhitelisted and not isBlacklisted and | |||
((not cardFilter) or (not cardFilter.hasWhitelist) or | |||
matches_card_list(cardFilter.cardWhitelist, callKey, compositeKey)) | |||
if allowCardEntry and (displayLabel ~= "" or content ~= "") then | |||
if not merged.sectionsMap[section] then | if not merged.sectionsMap[section] then | ||
merged.sectionsMap[section] = true | merged.sectionsMap[section] = true | ||
| Строка 368: | Строка 372: | ||
end | end | ||
if | if allowCardEntry and tagText ~= "" then | ||
if not merged.tagSet[tagText] then | if not merged.tagSet[tagText] then | ||
merged.tagSet[tagText] = true | merged.tagSet[tagText] = true | ||
| Строка 531: | Строка 535: | ||
break | break | ||
end | end | ||
end | |||
if not filter.hasWhitelist and filter.whitelist.cardContent and next(filter.whitelist.cardContent) ~= nil then | |||
filter.hasWhitelist = true | |||
end | end | ||
return filter | return filter | ||
| Строка 539: | Строка 546: | ||
noHeaders = false, | noHeaders = false, | ||
cardFilter = { | cardFilter = { | ||
hasWhitelist = filter.whitelist.cardContent and next(filter.whitelist.cardContent) ~= nil or false, | |||
cardWhitelist = filter.whitelist.card or {}, | |||
blacklist = filter.blacklist.cardContent or {}, | blacklist = filter.blacklist.cardContent or {}, | ||
whitelist = filter.whitelist.cardContent or {} | whitelist = filter.whitelist.cardContent or {} | ||