From c7db5088cf553d761021d59ef7a9c7d7e32e2c0b Mon Sep 17 00:00:00 2001
From: "Sven M. Hallberg" <pesco@khjk.org>
Date: Sat, 23 Nov 2019 13:52:53 +0100
Subject: [PATCH] eol before endstream is optional

---
 pdf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pdf.c b/pdf.c
index bd029ed..7df5565 100644
--- a/pdf.c
+++ b/pdf.c
@@ -273,7 +273,7 @@ pdf_parser(void)
 
 	/* streams */
 	H_RULE(stmbeg,	SEQ(dict, KW("stream"), OPT(cr), lf));
-	H_RULE(stmend,	SEQ(eol, KW("endstream")));
+	H_RULE(stmend,	SEQ(OPT(eol), LIT("endstream")));
 	H_ARULE(stream,	h_left(h_bind(stmbeg, kstream, NULL), stmend));
 		// XXX is whitespace allowed between the eol and "endstream"?
 
-- 
GitLab