Skip to content

feat(layout): an opt-in cut of a long address or path after a slash or hyphen - #733

Merged
Tim81 merged 34 commits into
mainfrom
fix/layout-url-breaks
Nov 28, 2026
Merged

Tim81 merged 34 commits into
mainfrom
fix/layout-url-breaks

Conversation

@Tim81

@Tim81 Tim81 commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

What

Document.BreakLongWordsAtPlaces, a new setting, off by default. With it set, a word wider than its line is cut after the last /, \ or - that leaves the line no wider than its width, and at the glyph only when it has no such place that fits. No hyphen or other glyph is added. A word that fits is never cut. This is the cut that #594 asks for.

Off, every wrap is main's: the same bytes and the same verdict for every document of a program that never sets the value true, whatever it forwards, splits or reuses. With the value false, every wrap takes main's own path: each one tests a parameter and runs the code main has.

On, the cut applies to the paragraph, heading, list item, note block and table cell wraps: a table cell given as a string or as runs, the line-count cache and the draw included. Preformatted does not read the value and cuts at the glyph, as on main. The setting is new API, so a program that sets it gets the new behaviour with no compatibility path, and its remarks give the refused set: a document that turns it on can take more lines and pages, can be refused at the 50,000-continuation limit, can be refused as too tall (a header row, a row-span group, any element), and a paragraph or table renderer, or a piece, refuses to be laid out under the other value.

Closes #594. #750 tracks making the cut the default. The PR does not touch #687, which is what main has.

Mechanism, stated once

  • The value is on the context. LayoutContext.BreakLongWordsAtPlaces { get; init; } is new public API, false by default. DocumentRenderer sets it from Document.BreakLongWordsAtPlaces on every context it makes; WithArea and the internal derivations copy it; a context a caller builds with new LayoutContext(area) has it false unless the caller sets it. A renderer of yours that lays a built-in renderer out passes the value on by deriving the child's context with WithArea, on any thread or task. There is no thread-static, AsyncLocal or per-save state.
  • A renderer keeps the value it first wrapped with, and refuses the other. A ParagraphRenderer or TableRenderer fixes the value at its first Layout that wraps text, and every piece it splits into copies it. Draw, the line counts, row resumption and every later wrap use that value, never the context's. A later Layout of the renderer or of a piece with a context whose value differs throws InvalidOperationException naming LayoutContext.BreakLongWordsAtPlaces, from that Layout and so from the save. Nothing wraps again, so a piece never mixes the line numbers of two wraps.
  • A list takes the value of each save. A ListRenderer builds its entries again whenever a new save lays it out, so the same instance laid out by two documents follows each document and is not refused; its pieces share the entries of the layout that cut them and are refused under the other value, as is a second value within one save. The rule is on LayoutContext.BreakLongWordsAtPlaces.
  • Why the refusal is allowed. It is reachable only when some context has the value true, which only a program that sets the document's property or the context's can make. A program that never does sees main's behaviour exactly.
  • Wraps that take no context (the static helpers) cut at the glyph, as main does.
  • Where the setting lives: one document-level switch, not a TextStyle member. A per-run need was not measured, and the effects that make the cut risky are document-level: the continuation limit and a table's header rows are read over a whole save. A value set on the document after a save is never used, as for MirrorMargins.

The rule

  • Places: after /, \ and -. \ is this library's own tailoring, read as / (UAX Deterministic output: DocumentId pin + determinism tests #14 gives it class PR).
  • ?, &, =, ., _ and # are not places. =, &, _, # are AL and . is IS. Before a letter LB28 (AL x AL) and LB29 (IS x AL) keep them joined, and before a digit LB23 (AL x NU) and LB25 (IS x NU) do. ? is EX; LB31 would allow a break after it, but the held text gives guidance for web addresses only for the solidus.
  • The test errs towards fewer places and is not UAX Deterministic output: DocumentId pin + determinism tests #14 rule for rule. The character after a place must be a letter or a decimal digit, which leaves out what LB13 (closing marks, EX, SY), LB15d (the full stop and the other IS) and the nonstarters of LB21 keep joined. A hyphen-minus also needs a letter or digit before it, which leaves out a hyphen that starts a word (LB20a) and any hyphen that follows another (LB31 would allow the break after -- before a letter, so this one is a coarsening).
  • Hebrew and kana, as the code does it: a Hebrew letter after the place character, or before a hyphen-minus, makes it no place (LB21b holds SY x HL, LB21a holds HL (HY | HH) x non-HL; applying both to all three characters is coarser than the rules). A Hebrew letter before a solidus is a place. Kana (U+3000 to U+30FF, the small kana extensions U+31F0 to U+31FF, halfwidth katakana U+FF66 to U+FF9F) after the place character is no place, because LB21 holds the small kana and the other nonstarters once CJ resolves to NS.
  • Digit rule: LB25 forbids HY x NU and NU (SY | IS)* x NU. A place of that kind is used only when no other place fits on the line, and before a glyph cut; the URL note in section 8 of the annex suppresses SY x NU for web addresses. For example ab12/34cdef... cuts after ab12/; ab-cd12/34eee... cuts after ab- first.
  • Choice: on each line, the last preferred place at or before the first character that does not fit; else the last LB25 place; else the glyph. The remainder is walked again with the same rule. Every line holds at least one character.

UAX #14 clauses used (held copy, tr14-55):

  • LB31: "Break everywhere else."
  • LB13: "Do not break before ‘]’ or ‘!’ or ‘/’" (so // is cut only after the second slash)
  • LB15d: "Otherwise, do not break before ‘;’, ‘,’, or ‘.’, even after spaces." (x IS)
  • LB25: HY x NU, NU ( SY | IS )* x NU
  • SY note: advises against the break "unless the distance … exceeds an implementation-defined minimal distance"; here it is used only for a word that cannot fit
  • URL tailoring (section 8): "suppresses SY x NU from rule LB25 within the scope of a URL"

Off equals main

Measured against origin/main at 33d423a with the head at 5522f61, both built Release net10.0 (the commits since change comments and tests only: the diff of the source folders with comment lines removed is empty), with the setting never set true anywhere. Each set is 150 documents from a generator that hashes the decompressed content, and every set is identical to main (3,300 documents, 0 differ); documents that throw throw the same message in both.

Sets Content
F, FX, FW words that all fit their line, with runs, no-break spaces, glued runs and places inside words; the same with a renderer of yours that forwards paragraphs, tables and lists, a start-line paragraph and an empty renderer of yours; and with a list that has an entry no page holds (FX 4, FW 18 throw in both)
N, NX, P words wider than their line with no place, with and without a renderer of yours (NX 1 throws in both); words wider than their line with places
NB, NBP the same with note blocks, with words that fit and with long words that hold places
U, US a forwarded paragraph, a forwarded paragraph with a start line, a start-line paragraph added directly, a forwarded list, a list after a renderer of yours, a list with an entry no page holds, a forwarded table; long words with places, then words that fit their line (46 and 63 throw in both)
H a renderer of yours hands a fresh paragraph renderer to the document as its overflow, long words
D, D2, DN, DN2 text added directly (paragraphs, headings, lists, tables, note blocks): words that all fit, and long words with no place (D 2, DN 9 throw in both)
A, B, C, AX, BX, UL short words with glued runs; long words with no place; long words with places; the first two with a renderer of yours; the paths of U with long words that hold places (UL 22 throw in both)

Real-limit rows (50,000 continuations, Courier 10, one line a page, page 80 x 37, 100 x 37 for lists): 40 rows give main's verdict and main's page count in both builds: 33 save and 7 are refused with the limit's message. Four of the saving rows are a table with a header row or a row-span cell. The rows are paragraph, heading, list item, a list in a renderer of yours, a list after a renderer of yours, start lines, a paragraph handed over as an overflow, page references, tab stops, headers and footers, a list near the limit, a list with an entry no page holds, and one renderer laid out in two documents, with texts of url words, no-break spaces and glued runs. The table rows, 70,000 rows of one url on a 92 x 180 page: forwarded by a renderer of yours, main saves 35,000 pages (136 s) and the head 35,000 (132 s); added directly, main 35,000 (335 s) and the head 35,000 (346 s).

Allocation with the setting off, GC.GetAllocatedBytesForCurrentThread over a save, same runtime, main against head: one paragraph 32,864 B and 32,864 B; one one-row table 24,488 B and 24,496 B; 500 tables 3,425,456 B and 3,429,456 B; a 2,000-row table (about 1,000 pages) 97,534,816 B and 97,550,808 B. The difference is 8 bytes for each TableRenderer and each piece it splits into (two bool fields), and nothing per draw or per wrap.

On and the refusals

LongWordBreakTests holds the cut tests and passes the value to each wrap: the exact index, the last place that fits, the LB25 fallback, //, no glyph added, a word that fits never cut, the interval a cell's cached line count holds over, link rectangles per piece, extraction, and PDF/A-2u (veraPDF 1.30.4). LongWordSettingTests pins the setting on the document; LongWordReuseTests pins the context and the binding.

Required Test
Off by default TheSettingIsOffByDefault
Off is main, on cuts, on every wrap path (paragraph, heading, list item, note block, cell string, cell runs, a paragraph in a renderer of yours) WithTheSettingOff_everyWrapCutsAtTheGlyph, WithTheSettingOn_everyWrapCutsAfterThePlace (7 kinds each)
The tab-stop wrap, and a cell of runs with a character outside the basic plane ATabbedParagraphCutsAfterThePlaceWhenOn_andAtTheGlyphWhenOff, ACellOfRunsHoldingACharacterOutsideTheBasicPlane_isCutAtTheOffsetsOfItsCharacters
On, refused at the limit, exact message; off saves WithTheSettingOn_aParagraphThatTakesMoreThanTheLimitIsRefused_andSavesWithItOff
On, refused as too tall, exact message: a header row, a row-span group WithTheSettingOn_aHeaderRowThatNoLongerFitsIsRefusedAsTooTall_andSavesWithItOff, WithTheSettingOn_aRowSpanGroupThatNoLongerFitsIsRefusedAsTooTall_andSavesWithItOff
A renderer of yours that derives the child's context passes the value, on the same thread, Task.Run, a new Thread, Parallel.For and under SuppressFlow; with a fresh new LayoutContext(area) the child reads false AParagraphLaidOutThroughADerivedContext_readsTheDocumentsValueOnAnyFlow, ATableLaidOutThroughADerivedContext_isMeasuredAndDrawnWithTheDocumentsValueOnAnyFlow, AParagraphLaidOutThroughAFreshContext_readsFalse_whateverTheDocumentSays, ATableLaidOutThroughAFreshContext_readsFalse_whateverTheDocumentSays
A renderer laid out in an on document and then an off one, and the reverse, is refused with the exact message; so is a split piece and a table piece that resumes a cut row AParagraphRendererLaidOutInADocumentWithTheOtherValue_isRefused, ATableRendererLaidOutInADocumentWithTheOtherValue_isRefused, APieceOfAParagraphIsBoundToTheValueItWasCutUnder, APieceOfATableThatResumesACutRowIsBoundToTheValueItWasCutUnder
A list instance laid out by two documents follows each and is not refused; a list whose indent leaves the text no width is laid out with the text under the setting; a table row cut across four pages draws every line after the place AListRendererLaidOutByTwoDocuments_followsEachDocumentAndIsNotRefused, APieceOfAListIsBoundToTheValueItWasCutUnder, AListWhoseIndentLeavesTheTextNoWidth_isLaidOutWithTheTextWithTheSettingOn, ATableRowCutAcrossPages_drawsEveryLineOfEveryPageAfterThePlace
Nothing outlives a save: a worker thread an on save started reads the later off document's value; work that outlives the save reads the context it was given AWorkerThatAnOnSaveStarted_readsTheLaterOffDocumentsValue, WorkThatOutlivesTheSave_readsTheContextItWasGiven_andNothingTheSaveLeft, TwoSavesInARow_eachReadItsOwnDocumentsValue
A multi-page table draws every line of every piece after the place; an off document after a refused on one saves as a fresh one ATableThatSplitsOverPages_drawsEveryLineOfEveryPieceAfterThePlace, ADocumentThatLeavesTheSettingOff_savesWhatAFreshOneDoes_afterAnOnDocumentWasRefused
A wrap that takes no context cuts at the glyph TheStaticWraps_takeNoValueAndCutAtTheGlyph

Mutations

Run in a detached worktree, net10.0, the three test classes; each fails at least one named test.

Mutant Fails
B1 a paragraph renderer accepts the other value 4, e.g. AParagraphRendererLaidOutInADocumentWithTheOtherValue_isRefused
B2 a table renderer accepts the other value 4, e.g. APieceOfATableThatResumesACutRowIsBoundToTheValueItWasCutUnder
B3 paragraph pieces do not carry the binding 2: APieceOfAParagraphIsBoundToTheValueItWasCutUnder
B4 table pieces do not carry the binding ATableThatSplitsOverPages_drawsEveryLineOfEveryPieceAfterThePlace
B5 a table draws with the glyph cut 10, e.g. ATableCellStringIsCutAtThePlace
B6 WithArea does not copy the value 12, e.g. AParagraphLaidOutThroughADerivedContext_readsTheDocumentsValueOnAnyFlow(Inline)
B7 the document does not set the value 45
B14 the lines of a cut row are wrapped at the glyph ATableRowCutAcrossPages_drawsEveryLineOfEveryPageAfterThePlace
B13 LayoutContext.Address does not copy the value AListWhoseIndentLeavesTheTextNoWidth_isLaidOutWithTheTextWithTheSettingOn
B9 a note block does not pass the value WithTheSettingOn_everyWrapCutsAfterThePlace(NoteBlock)
B10 the row heights ignore the value 2, e.g. WithTheSettingOn_aHeaderRowThatNoLongerFitsIsRefusedAsTooTall_andSavesWithItOff
B11 the tab-stop wrap cuts at the glyph ATabbedParagraphCutsAfterThePlaceWhenOn_andAtTheGlyphWhenOff
B12 a run cell counts every character as one UTF-16 unit ACellOfRunsHoldingACharacterOutsideTheBasicPlane_isCutAtTheOffsetsOfItsCharacters

Not killed: the bind of each list entry's content before its line count is read. By reading the code, no program reaches it: the one line count that can precede an entry's first layout is UnitBound, which runs only under a context the document addressed, after TryEntriesOnAnEmptyPage has laid every entry out under the same value. It is a guard, kept for that reason.

Not changed

The continuation-limit decision, the list, heading and table twins, Tokenise and the word split of #562 and #590 are as on main.

Extraction, links

No glyph is added, so a cut address extracts as written with the extractor's line separator between the pieces. Reading a cut address back as one token needs marked content (/ActualText), which is #588 (v2.5). A LinkUri or LinkAnchor run that wraps gets one rectangle per piece, and a test checks that each covers its piece.

A word wider than its line was cut at a glyph, so a web address or a
path ended a line anywhere. It is now cut after the last solidus,
reverse solidus or hyphen-minus that leaves the line no wider than its
width, and at a glyph only when it has none. No hyphen or other glyph is
added. One function decides the places, from UAX #14, and the paragraph,
heading and list-item wrap and the table cell wrap, as a string and as
runs, all call it. The cell's line-count cache reads the same walk, so
its width intervals stay exact.
…594, #687)

A paragraph, heading, list item or table cell whose new wrap would
change whether the element reaches the continuation limit now lays out
the way 2.3.3 did, through the shared limit decision. The twin of a
paragraph is 2.3.3's word split, where a word never continues over a
run boundary and U+202F and U+2007 are spaces, with a cut at the glyph.
The twin of a table cuts at the glyph too.

A paragraph reports only when its two wraps give a different number of
lines, so a document far from the limit keeps the cut after a solidus
or hyphen and pays for no extra pass. A renderer a caller holds, and a
start line a caller made, read 2.3.3's wrap, as the table and the list
already do.
Tim81 added 15 commits November 27, 2026 11:22
…st the boundaries (#687)

The paragraph guessed where its two wraps differ and missed a run
boundary that holds U+00A0 and an empty run. It now reports the bound
every wrap meets, wherever 2.3.3's wrap applies, and the limit decision
probes exactly, only where that bound passes what the limit leaves. The
second wrap that only compared line counts is gone.

The place characters have one definition, the tier tests read the word
through the same analysis the wrap does, and the rows the review named
are tests.
… differ (#687)

A list adds up the lines of its entries, and that bound has to hold for
2.3.3's wrap too. Counting the characters of every entry made lists that
no wrap can change reach the limit decision for nothing. The entry now
reads whether its wraps can differ from the tokeniser's own decision
and from whether its wrap cut at a place.
…es it (#687)

The wrap of 2.3.3 was applied wherever a twin or a forwarded renderer
was used: a list sent to its twin for an undrawable font, a renderer of
the caller's in the document or an entry that fits no empty page, a
forwarded table and a paragraph with a start line. The rulings of #682
say those lists are placed as main places them, and nothing about them
concerns the limit, so they changed output for no verdict's sake.

The 2.3.3 wrap now applies to the twin the document chose or is probing,
to the entries of a list laid out as its twin for the limit, and to the
entries of every list of a document in which an element after a list
comes near the limit. A context says so (WrapAsBefore); the table twin
cuts at the glyph under the same condition.

The list's bound for an entry reads the join of runs from the tokeniser
itself, so runs that share one style instance count, and the cut no
longer appends a rune through a boxing call, which allocated more than
main did per character.

The rows that pin the verdict of 2.3.3 are taken from a v2.3.3 build,
one line to a page, with runs that share a style instance and runs that
do not.
…#687)

The CHANGELOG listed places where text wraps as 2.3.3 did that the code
no longer treats so: a list sent to its twin for an undrawable font, a
renderer of the caller's or an entry no page holds, a forwarded table,
and a renderer of the caller's laying out a library renderer. Each
review round found another place the prose left out, because the rule
was written as a list of populations. It is now one condition, that the
continuation limit chose the layout, stated once in IRenderer.Layout,
and the entries for #562, #590 and #594 point to it.

The entry also says what the probe costs in the terms measured: a
paragraph longer than the continuations left is probed, whatever its
page count.
…om v2.3.3

The list entry's bound reads a cut and the white-space normalisation as
well as the join of runs, and each read needs a row at one line to a
page, where the bound is the lines and a wrong answer lets the current
wrap decide. The pages come from a v2.3.3 build.
…twin's reads (#687)

A cut after a place never gives fewer lines than a cut at the glyph for
the same words, because each glyph line starts no earlier and reaches at
least as far. The current lines therefore already bound the twin's, and
the list entry needs to read only the joins and the white-space
normalisation. The thread-static counter that told the wrap whether it
had cut at a place goes with it.

A run with no style that holds no word was exempted from the twin wrap,
although 2.3.3 read it as nothing and wrapped the paragraph; one that
holds a word is refused by the current wrap before any decision. The
exemption only changed a verdict. Rows for the no-break spaces in the
direction where 2.3.3 refuses, and for the empty run with no style, pin
what is left.
… or probes (#687)

A document that holds a renderer of the caller's lays every list out as
its twin and places the pieces of that twin with no report, which sets
the session's mode to Twin without a decision of the limit's. The
entries of those pieces took 2.3.3's wrap, so a list on the pages after
the first changed the bytes of a document that is nowhere near the
limit, against the ruling that such a list is placed as main places it.

The condition is now the limit's own: the twin the decision chose
(TwinChosen) or one a probe is measuring. The paragraph, the heading,
the list and the table read it through one method on the context. The
list test spans pages, with a renderer of the caller's before the list,
and the byte sets with a renderer of the caller's equal main again.
…out itself (#594)

The cut after a solidus or hyphen took more lines than the cut at the
glyph on every path, including the ones the continuation-limit decision
cannot see: a library renderer that a renderer of the caller's lays out,
a table it forwards to, a renderer built with a start line, and the
lists the document lays out as their twin for another cause. A text
that 2.3.3 and main save at the limit was refused there, and nothing
could probe it. Those paths now wrap as main does: main's tokenisation
and the cut at the glyph, so main's bytes and main's verdict.

A paragraph cuts after a place when the document, or a built-in parent
the document addressed, calls it, or when a note block says so; a table
does when it is the one the document called, not its twin and not one a
caller forwards. A renderer with a start line reports nothing to the
decision, because the start indexes lines of main's wrap. A note block
is new, so its paragraphs take the cut with no twin.

The rows that keep main's verdict, one for each such path, the third
case of the limit (the entries of a list before an element near the
limit, on the first page and the pages after it), the note block near
the limit and the forwarded table's Draw are tests.
…'s wrap

The entry for #687 claimed the limit verdict of 2.3.3 for every element
and said the cut applied wherever text wraps, while the two entries
contradicted each other and the code kept main's wrap on some paths. The
rule is now one entry: the cut applies to the text the document lays out
itself, the paths the limit decision cannot see wrap exactly as before,
and the decision keeps 2.3.3's verdict only for what it can see. A
paragraph a renderer of the caller's lays out keeps the word split of
#562, which #687 still records.
…else (#594)

The field that carried "this table cuts at the glyph" from Layout to Draw
always held whether the table is the twin: a table laid out under a
context that does not address it goes to its twin, and the twin cuts at
the glyph, so the New table is only ever laid out addressed. The forwarded
table's Draw still needs the scope, and a test draws one.

A renderer built with a start line must not report to the limit
decision either; the row for one added directly now asserts no probe.
…594)

Five review rounds kept finding paths where the cut, which can take more
lines than a cut at the glyph, turned a document that saved into a
refusal: at the continuation limit, and as a table header row or row-span
group that no longer fits a page. The cut now ships as
Document.BreakLongWordsAtPlaces, off by default. Off, every wrap is the
one on main, byte for byte and verdict for verdict.

On, every wrap the document performs cuts after the last solidus,
reverse solidus or hyphen-minus that fits: paragraph, heading, list item,
note block, table cell string and runs, and a built-in renderer that a
caller's renderer lays out during the save. The save sets a thread
scope for the duration of its layout; a wrap made outside a save reads
nothing and cuts at the glyph. The setting is new API, so it needs no
compatibility twin, and its remarks name the refusals it can cause.

Removed with it: the 2.3.3-wrap twins of the paragraph, heading, list
and table that #687 needed to keep the limit's verdict, IsLimitTwin, the
path classification, the list-entry pre-check, the Tokenise join flag and
the glyph-cut scopes. Tokenise is as on main, and #687 is not touched.
The save sets the cut on its own thread for the length of its layout. A
document that has it on, one that has it off after it, a layout that
throws, and a wrap outside any save are read in turn, so a scope that is
not restored fails here.
…all directly (#594)

The cut tests call the string and run wraps of a table cell without a
save, which sets the cut on its own thread, so they read it off. A helper
that forwarded to itself instead of to the wrap also overflowed the stack
in one test host; it forwards to the wrap now.
… formatter does (#594)

dotnet format --verify-no-changes failed on the new test file, which
CI gates.
# Conflicts:
#	CHANGELOG.md
#	src/VellumPdf.Layout/PublicAPI.Unshipped.txt
…follow the document (#594)

A paragraph or table renderer that one document laid out with the setting
on and a second one laid out with it off kept the first wrap, so the
second document was not what main gives. The paragraph now keeps the
setting beside its wrapped lines and its split pieces copy it, and wraps
again when the save that reads it differs. The table holds the setting in
the key of its layout decision and draws under the setting its layout
used, so the heights it measured and the lines it draws cannot disagree.

The setting was thread-static, so a built-in renderer that a caller's
renderer laid out on a task or a new thread during the save read off. It
is an AsyncLocal now, as ListLayoutRun is, and flows to both; work queued
with the execution context suppressed still reads off.

The remarks of the setting, IRenderer.Layout and the CHANGELOG follow
what the code does: an exception tag naming every save, the ignore set, no
claim that a renderer keeps its first wrap, and 2.3 instead of "every
version before 2.4".
@Tim81 Tim81 changed the title fix(layout): cut a long address or path after a slash or hyphen feat(layout): an opt-in cut of a long address or path after a slash or hyphen Nov 28, 2026
…nd a renderer to one value (#594)

The setting was read from an AsyncLocal that the save set, so a renderer
laid out in another flow, a worker that outlived the save, or a piece
re-wrapped under the other value read or drew something other than what
the document said. Each fix added another way for a renderer's own state
and the ambient value to disagree.

The value is now LayoutContext.BreakLongWordsAtPlaces. The document sets
it on every context it makes, WithArea and the internal derivations copy
it, and a context a caller builds has it false. A paragraph or table
renderer fixes the value at its first layout that wraps, and its pieces
copy it; Draw, line counts, resumed rows and every later wrap use that
value. A later layout under the other value throws
InvalidOperationException naming the property, so a piece never mixes
line numbers of two wraps and nothing re-wraps. The refusal is reachable
only when some context has the value true, so a program that never sets
either property sees main's behaviour. The static wraps take no value.

The wrap helpers take the value as a parameter, the scope and the
per-setting caches are gone, and the docs, the tests and the CHANGELOG
state the mechanism once.
…ong-word value (#594)

A ListRenderer builds its entries again for each save, so the same
instance laid out by two documents with different values follows each
and is refused only within one save, where a paragraph or table renderer
and every piece are bound to their first value. The remarks of
LayoutContext.BreakLongWordsAtPlaces now say so and the remarks of the
document property, IRenderer.Layout and the CHANGELOG point to it.

Preformatted does not read the value and cuts at the glyph, which the
summaries and the sentences about "every wrap" now say. Paragraph, Cell
and NoteBlock name the context value instead of the document setting.

Tests pin the list rule, a table row cut across four pages with the
setting on, and a list entry that moves to the next page with it on.
…tting on (#594)

The earlier case moved an entry to the next page and passed with the
child context losing the value, because that layout and the one a list
falls back to saved the same bytes. A gutter that leaves the text
narrower than its word is laid out differently by the two, so the test
fails when the context a list makes for its entries drops the value.
…t context case (#594)

The previous indent left the text a width, which the layout a list falls
back to also draws, so the case could not tell the two apart. With an
indent wider than the list the document's own layout draws the text and
the fallback discards it.
… code makes them (#594)

The document reads its property when a save lays out and at no other
time, and the value is not read from the thread, a task or an earlier
save. A test pins that a list piece, which shares the entries of the
layout that cut it, is refused under the other value.
@Tim81
Tim81 merged commit ae94188 into main Nov 28, 2026
4 checks passed
@Tim81
Tim81 deleted the fix/layout-url-breaks branch November 28, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Layout: long URLs and paths break only at a glyph, never after a slash or hyphen

1 participant