Module:T-Campaign: Difference between revisions

// via Wikitext Extension for VSCode
Tag: Reverted
// via Wikitext Extension for VSCode
Tag: Reverted
Line 183: Line 183:
         end
         end
          
          
         -- INLINE PLACEHOLDER REPLACEMENT (copied from working T-Campaign-Git.lua)
         -- DEFENSIVE: Handle case where title might be a table (like original WikitextProcessor did)
        local titleValue = args._campaign_data.defaults.title or "Campaign"
        if type(titleValue) ~= "string" then
            titleValue = tostring(titleValue)
            ErrorHandling.addStatus(context, 'campaignBanner', 'Title was not a string', 'Type: ' .. type(args._campaign_data.defaults.title) .. ', Converted to: "' .. titleValue .. '"')
        end
       
         local placeholderValues = {
         local placeholderValues = {
             CAMPAIGN_NAME = args._campaign_data.defaults.title or "Campaign"
             CAMPAIGN_NAME = titleValue
         }
         }