From 0407d588dd943ededdab4c4568e9a8872ec4fd27 Mon Sep 17 00:00:00 2001
From: sw3205933776 <3205933776@qq.com>
Date: Thu, 16 Oct 2025 14:58:09 +0800
Subject: [PATCH] fix: correct ordered list rendering in Markdown where all
items appeared as "1."
---
src/components/ChatBox/MarkDown.tsx | 16 ++++++++--------
src/components/WorkFlow/MarkDown.tsx | 16 ++++++++--------
src/style/index.css | 5 +++++
3 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/src/components/ChatBox/MarkDown.tsx b/src/components/ChatBox/MarkDown.tsx
index fd5d6ce9f..c0ce71331 100644
--- a/src/components/ChatBox/MarkDown.tsx
+++ b/src/components/ChatBox/MarkDown.tsx
@@ -49,7 +49,7 @@ export const MarkDown = memo(
}, [content, speed, enableTypewriter, onTyping]);
return (
-
+
),
- ol: ({ children }) => (
-
- {children}
-
- ),
+ // ol: ({ children }) => (
+ //
+ // {children}
+ //
+ // ),
li: ({ children }) => (
{children}
),
diff --git a/src/components/WorkFlow/MarkDown.tsx b/src/components/WorkFlow/MarkDown.tsx
index 66056736e..cdeebba81 100644
--- a/src/components/WorkFlow/MarkDown.tsx
+++ b/src/components/WorkFlow/MarkDown.tsx
@@ -48,7 +48,7 @@ export const MarkDown = ({
return text.replace(/\\n/g, " \n "); // add two spaces before \n, so ReactMarkdown will recognize it as a line break
};
return (
-
+
),
- ol: ({ children }) => (
-
- {children}
-
- ),
+ // ol: ({ children }) => (
+ //
+ // {children}
+ //
+ // ),
li: ({ children }) => (
{children}
),
diff --git a/src/style/index.css b/src/style/index.css
index 46a11b36a..df6441f0e 100644
--- a/src/style/index.css
+++ b/src/style/index.css
@@ -357,4 +357,9 @@ code {
.stack-login-btn,
.stack-login-btn button {
width: 100%;
+}
+
+.markdown-container ol {
+ padding-left: 1rem;
+ font-size: 12px; /* text-sm */
}
\ No newline at end of file