Skip to content

v0.11.2

Choose a tag to compare

@github-actions github-actions released this 02 May 02:18
· 24 commits to main since this release

EPUB import + export fixes

Bug fixes

  • Import — Windows ENOENT crash: EPUBs whose first chapter <h1> is a long content-warning paragraph used to crash the import on Windows because the resulting filename exceeded the default 260-char MAX_PATH. Slug filenames are now capped at 80 chars (overridable).
  • Import — leaked chapter heading in body: The walker used to leave the first <h1>/<h2> text in the chapter body markdown, doubling the title on round-trip export. Now stripped at import. Mid-body headings are preserved.
  • Export — duplicate <h1> per chapter: epub-gen-memory's default prependChapterTitles: true injected an extra heading on top of every chapter, on top of our own Chapter N + chapter-title subtitle. Now disabled.
  • Bundle export — TOC duplicates: Bundle exports inject a story title-page chapter as a section divider. When the title-page label was redundant with the immediately-following chapter (single-chapter stories where chapter title = story title, or a titleOverride like "Foo (The Collector, #1)" wrapping chapter Foo), the TOC showed two identical-looking rows in a row. The title-page chapter still renders in the spine (visible section break while reading) but is now hidden from the NAV/NCX TOC in those cases. Multi-chapter stories with distinct first-chapter titles keep their divider entry.

Tooling

  • scripts/clean-imported-chapter-bodies.mjs — one-time migration to strip leaked title paragraphs from chapters imported before the walker fix. Dry-run by default; pass --apply to write.
  • CI: build EPUB fixtures explicitly before the privacy egress step (the step ran vitest directly and bypassed the pretest hook).

Pull request

#45