diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-24 19:14:16 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-24 19:14:16 +0100 |
commit | fe7182d28856514d2e19a3ef588282129cc21fe2 (patch) | |
tree | 6d5e9397e56ee68b7ea6e6bfa09b049548d11dc6 /src/Text/Hakyll/Page.hs | |
parent | d97a53b6b490bc997cfee6d2f16ab7cba9499347 (diff) | |
download | hakyll-fe7182d28856514d2e19a3ef588282129cc21fe2.tar.gz |
Added support for literate haskell files - patch by Mark Harris.
Diffstat (limited to 'src/Text/Hakyll/Page.hs')
-rw-r--r-- | src/Text/Hakyll/Page.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Hakyll/Page.hs b/src/Text/Hakyll/Page.hs index e522605..7aa6a25 100644 --- a/src/Text/Hakyll/Page.hs +++ b/src/Text/Hakyll/Page.hs @@ -67,12 +67,15 @@ writerOptions = defaultWriterOptions getRenderFunction :: String -> (String -> String) getRenderFunction ".html" = id getRenderFunction ext = writeHtmlString writerOptions - . readFunction ext readerOptions + . readFunction ext (readOptions ext) where readFunction ".rst" = readRST readFunction ".tex" = readLaTeX readFunction _ = readMarkdown + readOptions ".lhs" = readerOptions { stateLiterateHaskell = True } + readOptions _ = readerOptions + -- | Split a page into sections. splitAtDelimiters :: [String] -> [[String]] splitAtDelimiters [] = [] |