FA-79955 / Typography line breaking / Member archive
Consecutive hyphen limit: streak reset on plain break · case 05
Hyphenation stops for the rest of the paragraph after the first ladder.
Case contract
Input [words as syllable lists, width, limit]. Greedy fill with 1-unit spaces and characters. A word that does not fit may be split at the latest syllable boundary whose head plus "-" fits, only if fewer than limit immediately preceding lines ended in a hyphen and the word is not the paragraph's last word. A line ended without hyphen resets the streak; a word too long for an empty line is set alone. Return the lines.
Why this case matters
Line breaking decides where paragraphs wrap on screen and in print; a wrong decision point shifts every following line.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: streak reset on plain break | ["column", "of", "compo-", "sition", "inter-", "na-", "tional", "a", "leading", "compo-", "sition", "inter-", "na-", "tional", "setting", "line", "column"] | ["column", "of", "compo-", "sition", "inter-", "na-", "tional", "a", "lead-", "ing", "compo-", "sition", "inter-", "na-", "tional", "set-", "ting", "line", "column"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗