Private betav0.1.0
Docs
Format developer documentation

SplitGranularity

Where Format may break content across a page boundary.

SplitGranularity controls how a piece of content breaks when it doesn't fit on the current page. The values range from none, which keeps the content whole and defers it, to grapheme, which can break almost anywhere. A finer granularity fits more onto each page; a coarser one keeps content intact, so the choice trades fitting against meaning.

Variants

NameDescription
none
Don't split. Content that doesn't fit is deferred whole to the next page. The default. Use it for content that is conceptually atomic, where breaking would lose meaning: invoice line items, profile cards, image-and-caption pairs, or code blocks.
sentence
Break at sentence boundaries, using Unicode-aware segmentation. Suits content where the sentence is the natural unit and breaking inside one would read awkwardly: legal clauses, terms and conditions, or formal documents where each sentence carries a discrete idea.
word
Break at word and line-break opportunities, using Unicode-aware segmentation. The natural choice for prose-heavy documents, like letters, articles, books, and reports, where readers expect content to flow continuously across pages.
grapheme
Break at individual grapheme clusters, the finest granularity. It can split mid-word, so reserve it for content where you can't rely on word boundaries: long unbroken strings like URLs or hex blobs, or languages without clear word separators such as Chinese or Japanese.
Was this page helpful?