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

мНет описания правки
Нет описания правки
Строка 131: Строка 131:
         tagSet = {}
         tagSet = {}
     }
     }
     if frame then
     if frame then
         local mainArgs = getArgs(frame, { removeBlanks = false })
         local mainArgs = getArgs(frame, { removeBlanks = false })
Строка 137: Строка 136:
         if rawTopCardTag and rawTopCardTag ~= "" then
         if rawTopCardTag and rawTopCardTag ~= "" then
             local ok, processed = pcall(function() return frame:preprocess(rawTopCardTag) end)
             local ok, processed = pcall(function() return frame:preprocess(rawTopCardTag) end)
             local topCardTag = ""
             local topCardTag = ok and processed or rawTopCardTag
            if ok and processed then topCardTag = trim(processed) else topCardTag = trim(rawTopCardTag) end
            topCardTag = trim(topCardTag)
 
             if topCardTag ~= "" then
             if topCardTag ~= "" then
                 for tag in string.gmatch(topCardTag, "[^,]+") do
                 for tag in string.gmatch(topCardTag, "[^,]+") do
Строка 151: Строка 149:
         end
         end
     end
     end
     for _, callKey in ipairs(keyOrder or {}) do
     for _, callKey in ipairs(keyOrder or {}) do
         local entries = keyToTemplates[callKey] or {}
         local entries = keyToTemplates[callKey] or {}