RED-7074: Design Subsection section tree structure algorithm

This commit is contained in:
Maverick Studer 2024-05-29 13:06:36 +02:00
parent 8a09d23b37
commit 3435606226

View File

@ -177,7 +177,7 @@ public class NerEntitiesAdapter {
private static List<Integer> getStringStartOffsetsForMainSectionsHeadersFooters(Document document) {
return document.streamChildren()
return document.streamAllSubNodes()
.filter(child -> (child.getType().equals(NodeType.FOOTER) ||child.getType().equals(NodeType.HEADER) ||child.getType().equals(NodeType.SECTION)))
.map(SemanticNode::getTextBlock)
.map(TextBlock::getTextRange)