@@ -18,16 +18,17 @@ import Tests.Helpers
1818import Test.Tasty.Golden (goldenVsString)
1919import qualified Data.ByteString as BS
2020import Text.Pandoc
21−import Text.Pandoc.UTF8 (toText, fromTextLazy)
22−import Data.Text (Text)
23−import Data.Text.Lazy (fromStrict)
21+import Text.Pandoc.UTF8 (toText, fromStringLazy)
22+import Data.Text (Text, unpack)
2423import System.FilePath (replaceExtension)
2524
2625fb2ToNative :: Text -> Text
2726fb2ToNative = purely (writeNative def{ writerTemplate = Just mempty }) . purely (readFB2 def)
2827
2928fb2Test :: TestName -> FilePath -> TestTree
30−fb2Test name path = goldenVsString name native (fromTextLazy . fromStrict . fb2ToNative . toText <$> BS.readFile path)
29+fb2Test name path = goldenVsString name native
30+ (fromStringLazy . filter (/='\r') . unpack . fb2ToNative . toText
31+ <$> BS.readFile path)
3132 where native = replaceExtension path ".native"
3233
3334tests :: [TestTree]