diff --git a/app/Main.hs b/app/Main.hs index 1dcf39193..576bc6026 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -65,7 +65,7 @@ printDiff arguments diff sources = case format arguments of put chunks = do renderer <- byteStringMakerFromEnvironment B1.putStr $ mconcat $ chunksToByteStrings renderer chunks - Split -> put (output arguments) =<< split diff sources + Split -> put (output arguments) $ split diff sources where put Nothing rendered = TextIO.putStr rendered put (Just path) rendered = do diff --git a/src/Split.hs b/src/Split.hs index 7521c27da..4b0cf52e8 100644 --- a/src/Split.hs +++ b/src/Split.hs @@ -31,8 +31,8 @@ type ClassName = T.Text classifyMarkup :: Foldable f => f String -> Markup -> Markup classifyMarkup categories element = maybe element ((element !) . A.class_ . stringValue . ("category-" ++)) $ maybeFirst categories -split :: Renderer leaf (IO TL.Text) -split diff (before, after) = return . renderHtml +split :: Renderer leaf TL.Text +split diff (before, after) = renderHtml . docTypeHtml . ((head $ link ! A.rel "stylesheet" ! A.href "style.css") <>) . body