Only use top- and second-level headings for the ToC
This commit is contained in:
parent
7b492cba91
commit
61601fde90
|
@ -66,7 +66,9 @@ impl Toc {
|
|||
}
|
||||
|
||||
if let Event::Start(Header(lvl)) = e {
|
||||
current_header_level = Some(lvl);
|
||||
if lvl < 3 {
|
||||
current_header_level = Some(lvl);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if let Event::End(Header(_)) = e {
|
||||
|
|
Loading…
Reference in a new issue