Files
familienarchiv/frontend/src/lib/utils/comment.ts
2026-04-15 14:23:25 +02:00

6 lines
250 B
TypeScript

export function extractQuote(content: string): { quote: string | null; body: string } {
const match = content.match(/^>\s*"(.+?)"\s*\n\n?([\s\S]*)$/);
if (match) return { quote: match[1], body: match[2] };
return { quote: null, body: content };
}