From 1fe7c252f236ea04ab6801f87ec6d2b05ab27654 Mon Sep 17 00:00:00 2001
From: Pompolic <pompolic@special-circumstanc.es>
Date: Thu, 20 Feb 2020 14:35:53 +0100
Subject: [PATCH] Improve whitespace handling

---
 pdf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pdf.c b/pdf.c
index 4310858..ade5cd7 100644
--- a/pdf.c
+++ b/pdf.c
@@ -874,8 +874,8 @@ init_parser(struct Env *aux)
 
 	/* AsciiHexDecode parser */
 	H_RULE(ahexeod,	h_ch('>'));
-	H_RULE(hdigitpair, SEQ(OPT(h_many(lwchar)), hdigit, OPT(h_many(lwchar)), hdigit));
-	H_ARULE(ahextruncated, SEQ(hdigit, OPT(h_many(lwchar)), ahexeod));
+	H_RULE(hdigitpair, SEQ(IGN(OPT(h_many(lwchar))), hdigit, IGN(OPT(h_many(lwchar))), hdigit));
+	H_ARULE(ahextruncated, SEQ(IGN(OPT(h_many(lwchar))), hdigit, IGN(OPT(h_many(lwchar))), ahexeod));
 
 	H_RULE(hs_end, CHX(hdigitpair, ahextruncated));
 	H_RULE(hexstream, SEQ(h_many(hdigitpair), hs_end));
-- 
GitLab