Модуль:Сущность/data: различия между версиями

Нет описания правки
Нет описания правки
Строка 342: Строка 342:
                 end
                 end


                 if not isWhitelisted and not isBlacklisted and (displayLabel ~= "" or content ~= "") then
                 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 not isWhitelisted and not isBlacklisted and tagText ~= "" then
                 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 {}