From 02ab858b4fa371c8e0c261b65ad425b382945019 Mon Sep 17 00:00:00 2001 From: APairOfMoons <84629346+APairOfMoons@users.noreply.github.com> Date: Tue, 21 Jul 2026 15:05:57 +0800 Subject: [PATCH] Disabled the markdown formats inheritance. --- .../java/cn/revaria/chatplus/util/TextStyleFormatter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/revaria/chatplus/util/TextStyleFormatter.java b/src/main/java/cn/revaria/chatplus/util/TextStyleFormatter.java index 39780c3..c39a4b0 100644 --- a/src/main/java/cn/revaria/chatplus/util/TextStyleFormatter.java +++ b/src/main/java/cn/revaria/chatplus/util/TextStyleFormatter.java @@ -43,6 +43,8 @@ public class TextStyleFormatter { String sourceLiteralText = translateInput(sourceRawText, sourcePlayer, formatsTable); /* Debug + sourcePlayer.sendSystemMessage(Component.literal("原始聊天代码:")); + sourcePlayer.sendSystemMessage(Component.literal(sourceMutableText.toString())); sourcePlayer.sendSystemMessage(Component.literal("原始聊天文本:")); sourcePlayer.sendSystemMessage(Component.literal(sourceRawText)); sourcePlayer.sendSystemMessage(Component.literal("提取到的聊天内容:")); @@ -67,7 +69,7 @@ public class TextStyleFormatter { } }*/ - MutableComponent finalText = Component.empty().setStyle(sourceMutableText.getStyle()); + MutableComponent finalText = Component.literal(""); ChatColorFormat currentColor = new ChatColorFormat(0, 'f'); HashSet currentFonts = new HashSet<>(); int startIndex = 0;