8,756
edits
imported>Teamtotobot ((by SublimeText.Mediawiker)) |
(if no color at the start detected, append &y or &y) |
||
Line 8: | Line 8: | ||
function normalize(input, type) | function normalize(input, type) | ||
type = type or 'xml' | type = type or 'xml' | ||
local a = '&y' and (type == 'notxml') or '&y' | |||
local b = input:gsub("(~J211)", "") | local b = input:gsub("(~J211)", "") | ||
if not b:match('^%&') then | |||
b = a .. b | |||
end | |||
b = b:gsub("(%*)", "*") | b = b:gsub("(%*)", "*") | ||
if type == 'xml' then | if type == 'xml' then |