import { marked } from 'marked'; /** * renderOfferHtml renders the public-offer markdown source into a standalone, * self-contained HTML document served statically at `/offer/`. The build emits * the result as `dist/offer/index.html` (see the `emit-offer` plugin in * `vite.config.ts`), which the landing container serves. * * The input `markdown` is trusted repository content (the owner-edited * `ui/legal/offer_ru.md`), not user input, so the rendered HTML is deliberately * not sanitised. The page carries its own minimal light/dark styling so it needs * neither the app bundle nor `app.css`. */ export function renderOfferHtml(markdown: string): string { const body = marked.parse(markdown, { async: false }) as string; return ` Публичная оферта — Эрудит
← На главную ${body}
`; }