/* istanbul ignore file */ /** * MarkdownContent Component * Renders markdown content with syntax highlighting and design system styling * This file is excluded from coverage as it's a documentation component */ import Image from 'next/image'; import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; import rehypeHighlight from 'rehype-highlight'; import rehypeSlug from 'rehype-slug'; import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import { CodeBlock } from './CodeBlock'; import { cn } from '@/lib/utils'; import 'highlight.js/styles/atom-one-dark.css'; interface MarkdownContentProps { content: string; className?: string; } export function MarkdownContent({ content, className }: MarkdownContentProps) { return (
{children}
), strong: ({ children, ...props }) => ( {children} ), em: ({ children, ...props }) => ( {children} ), // Links - more prominent with better hover state a: ({ children, href, ...props }) => ( {children} ), // Lists - improved spacing and hierarchy ul: ({ children, ...props }) => (
{children}
);
}
return (
{children}
);
},
pre: ({ children, ...props }) => {children}), // Tables - improved styling with better borders and hover states table: ({ children, ...props }) => (