toc.select("li > ul.sectlevel2").forEach(subsection ->
subsection.parent().remove()
);
toc.forEach(part ->
part.select("a[href]").stream()
.filter(anchor ->
doc.select(anchor.attr("href")).get(0).parent().classNames().stream()
.anyMatch(clazz -> clazz.startsWith("reveal")))
.forEach(href -> href.parent().remove())