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 {
|
if let Event::Start(Header(lvl)) = e {
|
||||||
|
if lvl < 3 {
|
||||||
current_header_level = Some(lvl);
|
current_header_level = Some(lvl);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if let Event::End(Header(_)) = e {
|
if let Event::End(Header(_)) = e {
|
||||||
|
|
Loading…
Reference in a new issue