Fix a bug preventing Hufflepdf from reading objects with a ' ' after the `obj` keyword

This commit is contained in:
Tissevert 2019-11-27 18:01:03 +01:00
parent d6994f0813
commit 380c1e439b
3 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# Revision history for Hufflepdf
## 0.2.0.1 -- 2019-11-27
* Fix bug discovered while running Hufflepdf on a PDF output from pdftk : magic keywords like `obj`, `stream` or `xref` can have spaces after them before the EOL
## 0.2.0.0 -- 2019-10-14
* Implement PDF's multilayer update mechanism

View File

@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/
name: Hufflepdf
version: 0.2.0.0
version: 0.2.0.1
synopsis: A PDF parser
-- description:
license: BSD3

View File

@ -49,7 +49,7 @@ import PDF.Parser (
import Text.Printf (printf)
line :: String -> Parser u ()
line l = (string (BS.pack l) *> EOL.parser *> return ()) <?> printf "line «%s»" l
line l = (string (BS.pack l) *> blank *> return ()) <?> printf "line «%s»" l
magicNumber :: ByteString
magicNumber = "%PDF-"