From 509f9199979a4f745aec3a2063abe306fde93cf5 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Fri, 26 Mar 2010 16:49:12 +0100 Subject: Fixed error when rendering literate Haskell. Literate haskell was not listed in the pattern matching on FileType's, so it gave an error that the file type could not be rendered. This was quickly resolved by adding it to the list. --- examples/feedblog/hakyll.hs | 1 - src/Text/Hakyll/Internal/Page.hs | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/feedblog/hakyll.hs b/examples/feedblog/hakyll.hs index 92fd4a8..c8633a9 100644 --- a/examples/feedblog/hakyll.hs +++ b/examples/feedblog/hakyll.hs @@ -34,7 +34,6 @@ main = hakyll "http://example.com" $ do mapM_ (renderChain ["templates/post.html", "templates/default.html"]) postPages -- Render RSS feed. - let renderRss myFeedConfiguration $ map (>>> copyValue "body" "description") (take 3 postPages) diff --git a/src/Text/Hakyll/Internal/Page.hs b/src/Text/Hakyll/Internal/Page.hs index 8f1b9d6..0ba8983 100644 --- a/src/Text/Hakyll/Internal/Page.hs +++ b/src/Text/Hakyll/Internal/Page.hs @@ -42,10 +42,11 @@ getRenderFunction Text = id getRenderFunction fileType = writeHtmlString writerOptions . readFunction fileType (readOptions fileType) where - readFunction ReStructuredText = readRST - readFunction LaTeX = readLaTeX - readFunction Markdown = readMarkdown - readFunction t = error $ "Cannot render file " ++ show t + readFunction ReStructuredText = readRST + readFunction LaTeX = readLaTeX + readFunction Markdown = readMarkdown + readFunction LiterateHaskellMarkdown = readMarkdown + readFunction t = error $ "Cannot render " ++ show t readOptions LiterateHaskellMarkdown = readerOptions { stateLiterateHaskell = True } -- cgit v1.2.3