1
Fork 0

Only use top- and second-level headings for the ToC

This commit is contained in:
Jan-Erik Rediger 2018-07-20 12:06:54 +02:00
parent 7b492cba91
commit 61601fde90

View file

@ -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 {