8,282
edits
No edit summary Tag: Manual revert |
(Add support for custom hex code colors) |
||
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 | ||