From 1eb1c23053b6ac7d95d4bd591443f668a2c7add8 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Wed, 18 Mar 2020 15:07:50 +0100 Subject: [PATCH] Found a nicer way to handle the too long IndirectObjCoordinates for Object Navigation --- src/PDF/Object/Navigation.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PDF/Object/Navigation.hs b/src/PDF/Object/Navigation.hs index 6d8a4b3..4d9a860 100644 --- a/src/PDF/Object/Navigation.hs +++ b/src/PDF/Object/Navigation.hs @@ -39,8 +39,8 @@ type Component = String getDictionary :: PDFContent m => Object -> m Dictionary getDictionary (Direct (Dictionary aDict)) = return aDict -getDictionary (Direct (Reference (IndirectObjCoordinates {objectId}))) = - objectById objectId >>= getDictionary +getDictionary (Direct (Reference ref)) = + objectById (objectId ref) >>= getDictionary getDictionary (Stream {header}) = return header getDictionary obj = expected "dictionary : " obj