diff --git a/ChangeLog.md b/ChangeLog.md index 8f52e5f..772fe58 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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 diff --git a/Hufflepdf.cabal b/Hufflepdf.cabal index f406ab5..bb4af94 100644 --- a/Hufflepdf.cabal +++ b/Hufflepdf.cabal @@ -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 diff --git a/src/PDF/Object.hs b/src/PDF/Object.hs index fc116e4..5971033 100644 --- a/src/PDF/Object.hs +++ b/src/PDF/Object.hs @@ -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-"