Fix matcher bug

This commit is contained in:
fullwall 2012-12-02 18:09:22 +08:00
parent f054289f46
commit 93378504ba
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,8 @@ public class StringHelper {
public static String parseColors(String parsed) {
Matcher matcher = COLOR_MATCHER.matcher(parsed);
if (!matcher.matches())
return parsed;
String replace = matcher.group(1) != null ? GROUP_1 : GROUP_2;
return matcher.replaceAll(replace);
}