Module:Suppress TemplateStyles
Appearance
| This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing. |
This is a simple module to remove the TemplateStyles strip markers from the parameter.
See also Template:Suppress TemplateStyles.
Usage
[edit]{{#invoke:Suppress TemplateStyles|suppressTemplateStyles|wikitext}}
local p = {}
function p._suppressTemplateStyles( text )
local ret = string.gsub( text, '\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127', '' )
return ret
end
function p.suppressTemplateStyles( frame )
return p._suppressTemplateStyles( frame.args[1] or frame:getParent().args[1] )
end
-- For the documentation only
function p.formatForDocumentation( frame )
return frame:extensionTag( 'pre', string.gsub( frame.args[1], '\127', '␡' ) )
end
return p