'use client' import { escapeHtml } from '@admin/utils/editor/escape-html' export function renderSimpleMarkdownBody(markdown: string) { const lines = markdown.trim().split('\n') const blocks: string[] = [] let paragraph: string[] = [] let listItems: string[] = [] const flushParagraph = () => { if (paragraph.length === 0) return blocks.push(`
${escapeHtml(paragraph.join(' ').trim())}
`) paragraph = [] } const flushList = () => { if (listItems.length === 0) return blocks.push(`