Module:ColorParse: Difference between revisions
Jump to navigation
Jump to search
(newline charas are turned into actual newlines regardless of parse type) |
imported>Teamtotobot ((by SublimeText.Mediawiker)) |
||
Line 6: | Line 6: | ||
--[Utility stuff]-- | --[Utility stuff]-- | ||
function normalize( | function normalize(input, type) | ||
type = type or 'xml' | type = type or 'xml' | ||
local b = | local b = input:gsub("(~J211)", "") | ||
b = b:gsub("(%*)", "*") | b = b:gsub("(%*)", "*") | ||
if type == 'xml' then | if type == 'xml' then | ||
b = | b = b:gsub("([{}])", "") | ||
end | end | ||
b = | b = b:gsub("(\\n)","\n") | ||
return b | return b | ||
end | end |