From d8c91180bc5a29e029e6feaa5cc5485517c7445c Mon Sep 17 00:00:00 2001 From: John Whitington Date: Tue, 24 Sep 2024 15:15:06 +0100 Subject: [PATCH] Fix tagging bug --- cpdfdraw.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpdfdraw.ml b/cpdfdraw.ml index 094d4cf..97c3eaa 100644 --- a/cpdfdraw.ml +++ b/cpdfdraw.ml @@ -645,7 +645,8 @@ let rec make_structure_tree pageobjnums pdf pagenum namespace = function make_structure_tree pageobjnums pdf pagenum namespace t | StDataBeginTree s::t -> let tree_contents, rest = find_tree_contents [] 1 t in - [StItem {kind = s; namespace = !namespace; alt = None; pageobjnum = None; children = make_structure_tree pageobjnums pdf pagenum namespace rest}] + StItem {kind = s; namespace = !namespace; alt = None; pageobjnum = None; children = make_structure_tree pageobjnums pdf pagenum namespace tree_contents} + ::make_structure_tree pageobjnums pdf pagenum namespace rest | StDataEndTree::t -> error "Too many -end-tags"