@@ -67,12 +67,15 @@ writerOptions = defaultWriterOptions
6767getRenderFunction :: String -> (String -> String)
6868getRenderFunction ".html" = id
6969getRenderFunction ext = writeHtmlString writerOptions
70− . readFunction ext readerOptions
70+ . readFunction ext (readOptions ext)
7171 where
7272 readFunction ".rst" = readRST
7373 readFunction ".tex" = readLaTeX
7474 readFunction _ = readMarkdown
7575
76+ readOptions ".lhs" = readerOptions { stateLiterateHaskell = True }
77+ readOptions _ = readerOptions
78+
7679-- | Split a page into sections.
7780splitAtDelimiters :: [String] -> [[String]]
7881splitAtDelimiters [] = []