Module:Template introspection: Difference between revisions
change text again |
bugfix templates that have subst/safesubst as part of the invocation |
||
| Line 35: | Line 35: | ||
:gsub("%s+", " ") | :gsub("%s+", " ") | ||
:match("^%s*(.-)%s*$") | :match("^%s*(.-)%s*$") | ||
-- Normalize more by removing subst, safesubst, and any extra curly brackets | |||
normalized = normalized | |||
:gsub("{{{|safesubst:}}}", "") -- Remove {{{{|safesubst:}}} if used | |||
:gsub("{{{|subst:}}}", "") -- Remove {{{{|subst:}}} if used | |||
:gsub("{{{{", "{{") -- Collapse excessive curly brackets | |||
:gsub("}}}}", "}}") -- Collapse excessive curly brackets | |||
return normalized | return normalized | ||