You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix and simplify unjustify, remove LineData::alignment (#271)
`unjustify` doesn't mirror `align`, so it performs the wrong
calculations, and re-line-breaking or re-aligning currently lead to the
wrong result after a justified alignment.
As the alignment function requires further iteration (e.g. for floated
boxes), this patch removes the specialized `unjustify` implementation
and instead uses the same code for aligning and unjustifying. This is a
trade-off between efficiency and correctness. If this is merged in, we
can always split the two again in the future once alignment has
stabilized.
This stores the width the layout was aligned to, which is necessary for
unjustifying.
Copy file name to clipboardexpand all lines: CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ This release has an [MSRV] of 1.82.
46
46
#### Parley
47
47
48
48
- Fix alignment of right-to-left text. ([#250][], [#268][] by [@tomcur][])
49
+
- Performing line breaking or aligning a layout again, after justified alignment had been applied previously, now lead to the correct results. ([#271][] by [@tomcur][])
49
50
50
51
## [0.2.0] - 2024-10-10
51
52
@@ -129,6 +130,7 @@ This release has an [MSRV] of 1.70.
0 commit comments