diff --git a/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx b/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx index 39926feee..02a9f3d8a 100644 --- a/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx +++ b/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx @@ -93,7 +93,7 @@ function MarkdownListItem({ children }: { children?: ReactNode }) { const listKind = useContext(ListKindContext); return ( -
  • +
  • {listKind === 'unordered' ? '- ' : null} {children}
  • diff --git a/apps/ai-game-creator-shell/tests/ChatMarkdownMessage.test.tsx b/apps/ai-game-creator-shell/tests/ChatMarkdownMessage.test.tsx index 43f4a9bde..30eac0d09 100644 --- a/apps/ai-game-creator-shell/tests/ChatMarkdownMessage.test.tsx +++ b/apps/ai-game-creator-shell/tests/ChatMarkdownMessage.test.tsx @@ -50,6 +50,7 @@ describe('ChatMarkdownMessage', () => { expect(items[0]?.textContent?.trim()).toBe('第一件事'); expect(items[1]?.textContent?.trim()).toContain('第二件事'); expect(items[0]?.querySelector('p')?.className ?? '').toContain('inline'); + expect(items[0]?.className).toContain('whitespace-normal'); expect(items[0]?.textContent).not.toContain('-'); });