@@ -11,7 +11,6 @@ module Text.Hakyll.Render.Internal
1111
1212import qualified Data.Map as M
1313import Text.Hakyll.Context (Context, ContextManipulation)
14−import Control.DeepSeq (deepseq)
1514import Control.Monad.Reader (liftIO)
1615import Data.List (isPrefixOf, foldl')
1716import Data.Char (isAlphaNum)
@@ -56,20 +55,18 @@ pureRenderWith manipulation template context =
5655 -- final render (just before writing).
5756 let contextIgnoringRoot = M.insert "root" "$root" (manipulation context)
5857 body = regularSubstitute template contextIgnoringRoot
59− -- Force the body to be rendered.
60− in body `deepseq` M.insert "body" body context
58+ in M.insert "body" body context
6159
6260-- | A pure renderAndConcat function.
6361pureRenderAndConcatWith :: ContextManipulation -- ^ Manipulation to apply.
6462 -> [String] -- ^ Templates to use.
6563 -> [Context] -- ^ Different renderables.
6664 -> String
67−pureRenderAndConcatWith manipulation templates contexts =
68− foldl' renderAndConcat [] contexts
65+pureRenderAndConcatWith manipulation templates =
66+ concatMap renderAndConcat
6967 where
70− renderAndConcat chunk context =
71− let rendered = pureRenderChainWith manipulation templates context
72− in chunk ++ fromMaybe "" (M.lookup "body" rendered)
68+ renderAndConcat = fromMaybe "" . M.lookup "body"
69+ . pureRenderChainWith manipulation templates
7370
7471-- | A pure renderChain function.
7572pureRenderChainWith :: ContextManipulation