mirror of
https://github.com/CarmJos/EasyPlugin.git
synced 2026-06-04 16:48:16 +08:00
fix(color): 修复ColorParse.clear功能异常的问题
This commit is contained in:
@@ -34,7 +34,7 @@ public class ColorParser {
|
||||
public static @NotNull String clear(@NotNull String text) {
|
||||
text = HEX_PATTERN.matcher(text).replaceAll("");
|
||||
text = GRADIENT_PATTERN.matcher(text).replaceAll("");
|
||||
text = COLOR_PATTERN.matcher(text).replaceAll("");
|
||||
text = FORMAT_PATTERN.matcher(text).replaceAll("");
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public class ColorParseTest {
|
||||
System.out.println(parse("&<#AAAAAA>&l我&r真&(#666666)的&<#BBBBBB>&o爱死&<#111111>你&<#FFFFFF>了&r!"));
|
||||
System.out.println(parse("&r正常的颜色理应&c&l不受影响&r。"));
|
||||
|
||||
System.out.println(clear("&f测试&<#AAAAAA>清理颜色代码&<#111111> &&这样应该&(#666666)不被影响 &f。"));
|
||||
System.out.println(clear("&f&l测试&<#AAAAAA>清理颜色代码&<#111111> &&这样应该&(#666666)不被影响 &f。"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user