Add dotted leaders to generated contents entries

This commit is contained in:
gloamxun committed 2026-10-19 14:20:30 +08:00
1 parent 1b0ce27ed3
commit 6d4aa37189
8 files changed
+79 -18

No files matched your search

@@ -427,6 +427,9 @@ fn contents_kind(block: &Block) -> Option<ContentsKind> {
fn contents_line_runs(title: &[Run], target: usize) -> Vec<Run> {
let mut runs = title.to_vec();
trim_run_end(&mut runs);
runs.push(Run::plain(
crate::document::CONTENTS_LEADER_MARKER.to_string(),
));
let mut filler = Run::plain(String::new());
filler.glue = Some(TeXGlue {
width: common::Scaled::ZERO,