Module:TemplateStarter: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Line 23: Line 23:
     templateType = mw.text.trim(tostring(templateType))
     templateType = mw.text.trim(tostring(templateType))
      
      
    -- Debug: Add detailed error information
     if not templateType:match("^[%w_%-]+$") then
     if not templateType:match("^[%w_%-]+$") then
         return string.format("Error: Invalid template type format. Received: '%s' (length: %d)", templateType, #templateType)
         return "Error: Invalid template type format"
     end
     end