diff --git a/src/components/game/ExpertMemo.tsx b/src/components/game/ExpertMemo.tsx index e30a817..ad2fc1d 100644 --- a/src/components/game/ExpertMemo.tsx +++ b/src/components/game/ExpertMemo.tsx @@ -12,6 +12,17 @@ export const ExpertMemo: React.FC = ({ from, subject, children, const highlightColor = isAlert ? 'text-red-500' : 'text-yellow-500'; const memoClass = isAlert ? 'expert-memo alert' : 'expert-memo'; + // Function to wrap text content in paragraph tags + const formatContent = (content: React.ReactNode) => { + if (typeof content === 'string') { + // Split by double newlines to separate paragraphs + return content.split('\n\n').map((paragraph, index) => ( +

{paragraph}

+ )); + } + return content; + }; + return (
@@ -30,8 +41,8 @@ export const ExpertMemo: React.FC = ({ from, subject, children,
- {children} + {formatContent(children)}
); -}; \ No newline at end of file +}; \ No newline at end of file