Module:ElementAchievementHeader: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Line 48: Line 48:
             )
             )
              
              
             -- If title achievement found, create a populated row (exact match with original)
             -- Always create a row for debugging purposes
             if achievementId ~= "" and displayName ~= "" and achievementId2 ~= "" then
             if achievementId ~= "" and displayName ~= "" and achievementId2 ~= "" then
                 -- Exactly matching original HTML structure from LuaTemplatePerson.lua
                 -- Achievement found - create populated row with achievement data
                 return string.format(
                 return string.format(
                     '|-\n! colspan="2" class="achievement-header %s" data-achievement-id="%s" data-achievement-name="%s" | %s%s',
                     '|-\n! colspan="2" class="achievement-header %s" data-achievement-id="%s" data-achievement-name="%s" | %s%s',
Line 56: Line 56:
                 )
                 )
             else
             else
                 -- Return only debug info without creating an actual row
                 -- No achievement found - create phantom row with debug info
                 return debugInfo
                 return string.format(
                    '|-\n! colspan="2" class="achievement-header-phantom" | %s',
                    debugInfo
                )
             end
             end
         end
         end