import React from 'react'; import { Header, Segment, Form, Button, Icon, Message, Card, Label, Divider, Accordion } from 'semantic-ui-react'; import superagent from 'superagent'; import ExperimentalWrapper from './ExperimentalWrapper.jsx'; // Simple markdown to HTML converter for basic formatting function renderMarkdown(text) { if (!text) return ''; let html = text // Escape HTML .replace(/&/g, '&') .replace(//g, '>') // Code blocks (```...```) .replace(/```(\w*)\n([\s\S]*?)```/g, '
$2
') // Inline code (`...`) .replace(/`([^`]+)`/g, '$1') // Headers .replace(/^### (.+)$/gm, '

$1

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

$1

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

$1

') // Bold .replace(/\*\*([^*]+)\*\*/g, '$1') // Italic .replace(/\*([^*]+)\*/g, '$1') // Unordered lists .replace(/^[\-\*] (.+)$/gm, '
  • $1
  • ') // Numbered lists .replace(/^\d+\. (.+)$/gm, '
  • $1
  • ') // Links .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1') // Line breaks (double newline = paragraph) .replace(/\n\n/g, '

    ') // Single line breaks .replace(/\n/g, '
    '); // Wrap consecutive

  • elements in