diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-22 13:18:58 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-22 13:18:58 +0100 |
| commit | 79d851cd0bb864da8de980965472c2b7f2fbdb1f (patch) | |
| tree | cfd24e8e950ea3983ce49d903e381c70ca57870f /library | |
| parent | 815ee3254c1f087771b7c38e6f85622f3aeddf7c (diff) | |
Fix fr handling for horizontal auto page
Diffstat (limited to 'library')
| -rw-r--r-- | library/src/layout/par.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs index 7db19095..2427aa98 100644 --- a/library/src/layout/par.rs +++ b/library/src/layout/par.rs @@ -1123,7 +1123,7 @@ fn finalize( ) -> SourceResult<Fragment> { // Determine the paragraph's width: Full width of the region if we // should expand or there's fractional spacing, fit-to-width otherwise. - if !expand && lines.iter().all(|line| line.fr().is_zero()) { + if !width.is_finite() || (!expand && lines.iter().all(|line| line.fr().is_zero())) { width = lines.iter().map(|line| line.width).max().unwrap_or_default(); } |
