mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-28 03:58:45 -06:00
M12: Heading-nesting findings read naturally ("H3 follows an H1")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e8bc0db811
commit
095a17610f
@@ -254,8 +254,8 @@ impl Tree {
|
||||
_ => continue,
|
||||
};
|
||||
if level > prev + 1 {
|
||||
let after = if prev == 0 { "the first heading".to_string() } else { format!("follows an H{prev}") };
|
||||
out.push(self.finding(i, &format!("H{level} is {after}; headings should not skip levels")));
|
||||
let what = if prev == 0 { format!("the first heading is an H{level}") } else { format!("H{level} follows an H{prev}") };
|
||||
out.push(self.finding(i, &format!("{what}; headings should not skip levels")));
|
||||
}
|
||||
prev = level;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user