Support ragged-right paragraphs with an infinite rightskip

This commit is contained in:
gloamxun committed 2026-10-23 04:08:32 +08:00
1 parent f488dd3b6c
commit 448152cea4
7 files changed
+81 -10

No files matched your search

+9
View File
@@ -384,6 +384,15 @@ fn hyphen_penalty_inhibits_hyphenation() {
});
}
/// `\raggedright` leaves an infinite `fil` in `\rightskip`, so lines stop at
/// their natural widths instead of stretching to the measure.
#[test]
fn ragged_right_matches_pdftex() {
compare_fixture_with(WORDS, 150, "\\raggedright ", |style| {
style.ragged_right = true;
});
}
/// `\hangindent`/`\hangafter` shift the affected lines and narrow their
/// measure exactly like pdfLaTeX.
#[test]