From 6894c5921fce25bcd97cf25f7c95cd1923f43cae Mon Sep 17 00:00:00 2001 From: John Moorman <45500240+mojoro@users.noreply.github.com> Date: Wed, 8 Apr 2026 20:48:33 +0200 Subject: [PATCH] Prevent bullet points and headings from splitting across PDF pages --- src/components/tailor/ResumePDFDocument.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/tailor/ResumePDFDocument.tsx b/src/components/tailor/ResumePDFDocument.tsx index 6568662..e1458e5 100644 --- a/src/components/tailor/ResumePDFDocument.tsx +++ b/src/components/tailor/ResumePDFDocument.tsx @@ -69,13 +69,13 @@ function parseInline(raw: string): Span[] { return spans.length > 0 ? spans : [{ kind: "text", text: raw }]; } -function InlineText({ text, baseStyle }: { text: string; baseStyle: Styles[string] }) { +function InlineText({ text, baseStyle, minPresenceAhead }: { text: string; baseStyle: Styles[string]; minPresenceAhead?: number }) { const spans = parseInline(text); if (spans.length === 1 && spans[0].kind === "text") { - return {text}; + return {text}; } return ( - + {spans.map((span, i) => { if (span.kind === "bold") return {span.text}; if (span.kind === "italic") return {span.text}; @@ -114,14 +114,14 @@ export function ResumePDFDocument({ markdown }: { markdown: string }) { if (line.type === "h1") return {line.text}; if (line.type === "h2") - return {line.text}; + return {line.text}; if (line.type === "h3") - return ; + return ; if (line.type === "h4") - return ; + return ; if (line.type === "bullet") return ( - + •