From ced81536febb754ab63844e10e1710c234eb0f98 Mon Sep 17 00:00:00 2001 From: Jayesh Betala Date: Mon, 8 Jun 2026 13:32:48 +0530 Subject: [PATCH] fix(make-pdf): stop content before the first H1 from forcing a blank page 1 (#1904) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `make-pdf` emitted a spurious blank/near-blank first page whenever any content preceded the first

. Two triggers: 1. YAML frontmatter — marked has no frontmatter awareness, so a leading `---\n...\n---` block rendered as a literal paragraph of body text. 2. A leading top-of-file \n\n# Hello\n\nBody.\n` }); + const chapters = result.html.match(/class="chapter"/g) ?? []; + // One chapter, not two — the invisible "); + expect(result.html).toMatch(/