Module:ColorParse: Difference between revisions

Jump to navigation Jump to search
103 bytes added ,  20:53, 15 November 2019
if no color at the start detected, append &y or &y
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

Navigation menu