Module:Lorebook/Debug: Difference between revisions

Replace nowiki with pre tag for proper MediaWiki rendering in debug output
Escape curly braces ({/}) in debug output to prevent template invocation
 
Line 291: Line 291:
   end
   end
    
    
   -- Use <pre> tag to preserve formatting and prevent wiki parsing in debug mode
   -- Escape curly braces and use <pre> tag to preserve formatting
   if result and result ~= '' then
   if result and result ~= '' then
    result = result:gsub('{', '&#123;'):gsub('}', '&#125;')
     output = output .. result .. '\n</pre>\n'
     output = output .. result .. '\n</pre>\n'
   else
   else