on master help sign in
Enable Pandoc's smart typography parsing.

Something like: -- to – and ... to …

commit271e7a386d9f49c2e8125ab8f3cfb440efca7eb4 authorSebastian Schwarz <seschwar@googlemail.com> dateTue 19 Jan 2010, 00:18 (17 years ago) parent8da35f6
1 file changed+5−1
src/Text/Hakyll/Page.hs+5−1
src/Text/Hakyll/Page.hs+5−1
@@ -52,6 +52,10 @@ getPagePath (Page page) =
5252getBody :: Page -> String
5353getBody (Page page) = fromMaybe [] $ M.lookup "body" page
5454
55+-- | The default reader options for pandoc parsing.
56+readerOptions :: ParserState
57+readerOptions = defaultParserState { stateSmart = True }
58+
5559-- | The default writer options for pandoc rendering.
5660writerOptions :: WriterOptions
5761writerOptions = defaultWriterOptions
@@ -60,7 +64,7 @@ writerOptions = defaultWriterOptions
6064getRenderFunction :: String -> (String -> String)
6165getRenderFunction ".html" = id
6266getRenderFunction ext = writeHtmlString writerOptions
63− . readFunction ext defaultParserState
67+ . readFunction ext readerOptions
6468 where
6569 readFunction ".rst" = readRST
6670 readFunction ".tex" = readLaTeX