8,289
edits
No edit summary Tag: Reverted |
(Add support for custom hex code colors) |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
filename = 'Invicon $1', | filename = 'Invicon $1', | ||
-- legacyFilename = 'Grid $1.png', | -- legacyFilename = 'Grid $1.png', | ||
legacyFilename = '$1Invicon $2', | legacyFilename = '$1Invicon $2.png', | ||
-- modLink = 'Mods/$1/$2', | -- modLink = 'Mods/$1/$2', | ||
modLink = '$1:$2', | modLink = '$1:$2', | ||
| Line 193: | Line 193: | ||
plainTitle = title:gsub( '\\\\', '\' ):gsub( '\\&', '&' ) | plainTitle = title:gsub( '\\\\', '\' ):gsub( '\\&', '&' ) | ||
local | local formatPatterns = {'&[0-9a-jl-qs-vyzr]', '&#%x%x%x%x%x%x', '&$%x%x%x'} | ||
if plainTitle:match( formatPattern ) then | for _, formatPattern in ipairs( formatPatterns ) do | ||
if plainTitle:match( formatPattern ) then | |||
formattedTitle = title | |||
plainTitle = plainTitle:gsub( formatPattern, '' ) | |||
end | |||
end | end | ||