'use client'; import React from 'react'; interface SimpleMarkdownRendererProps { content: string; } const SimpleMarkdownRenderer: React.FC = ({ content }) => { // Convert markdown to HTML with basic formatting const formatContent = (text: string) => { return ( text // Headers .replace( /^### (.*$)/gm, '

$1

', ) .replace( /^## (.*$)/gm, '

$1

', ) .replace( /^# (.*$)/gm, '

$1

', ) // Bold text .replace( /\*\*(.*?)\*\*/g, '$1', ) // Italic text .replace(/\*(.*?)\*/g, '$1') // Lists .replace(/^\- (.*$)/gm, '
  • • $1
  • ') // Line breaks .replace(/\n\n/g, '

    ') .replace(/\n/g, '
    ') // Wrap in paragraphs .replace(/^(?!<[h|l])/gm, '

    ') // Clean up .replace(/

    <\/p>/g, '') ); }; return (

    ); }; export default SimpleMarkdownRenderer;