on master help sign in
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.

commit509f9199979a4f745aec3a2063abe306fde93cf5 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateFri 26 Mar 2010, 16:49 (17 years ago) parentc9e3458
2 files changed+5−5
examples/feedblog/hakyll.hs−1 src/Text/Hakyll/Internal/Page.hs+5−4
examples/feedblog/hakyll.hs−1
@@ -34,7 +34,6 @@ main = hakyll "http://example.com" $ do
3434 mapM_ (renderChain ["templates/post.html", "templates/default.html"]) postPages
3535
3636 -- Render RSS feed.
37− let
3837 renderRss myFeedConfiguration $
3938 map (>>> copyValue "body" "description") (take 3 postPages)
4039
src/Text/Hakyll/Internal/Page.hs+5−4
@@ -42,10 +42,11 @@ getRenderFunction Text = id
4242getRenderFunction fileType = writeHtmlString writerOptions
4343 . readFunction fileType (readOptions fileType)
4444 where
45− readFunction ReStructuredText = readRST
46− readFunction LaTeX = readLaTeX
47− readFunction Markdown = readMarkdown
48− readFunction t = error $ "Cannot render file " ++ show t
45+ readFunction ReStructuredText = readRST
46+ readFunction LaTeX = readLaTeX
47+ readFunction Markdown = readMarkdown
48+ readFunction LiterateHaskellMarkdown = readMarkdown
49+ readFunction t = error $ "Cannot render " ++ show t
4950
5051 readOptions LiterateHaskellMarkdown =
5152 readerOptions { stateLiterateHaskell = True }