Fix matcher bug

This commit is contained in:
fullwall 2012-12-02 18:09:22 +08:00
parent e6023c2e81
commit 51bfe23f98

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);
}