diff options
author | Sebastian Schwarz <seschwar@googlemail.com> | 2010-01-19 00:18:55 +0100 |
---|---|---|
committer | Sebastian Schwarz <seschwar@googlemail.com> | 2010-01-19 00:18:55 +0100 |
commit | 271e7a386d9f49c2e8125ab8f3cfb440efca7eb4 (patch) | |
tree | e278775f34c06178408119e7ee2126832e2d2026 /src | |
parent | 8da35f6c6df6f947506fa4fa2f3705c88b9f56ab (diff) | |
download | hakyll-271e7a386d9f49c2e8125ab8f3cfb440efca7eb4.tar.gz |
Enable Pandoc's smart typography parsing.
Something like: -- to – and ... to …
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Hakyll/Page.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Hakyll/Page.hs b/src/Text/Hakyll/Page.hs index 41ddba6..b58ea0f 100644 --- a/src/Text/Hakyll/Page.hs +++ b/src/Text/Hakyll/Page.hs @@ -52,6 +52,10 @@ getPagePath (Page page) = getBody :: Page -> String getBody (Page page) = fromMaybe [] $ M.lookup "body" page +-- | The default reader options for pandoc parsing. +readerOptions :: ParserState +readerOptions = defaultParserState { stateSmart = True } + -- | The default writer options for pandoc rendering. writerOptions :: WriterOptions writerOptions = defaultWriterOptions @@ -60,7 +64,7 @@ writerOptions = defaultWriterOptions getRenderFunction :: String -> (String -> String) getRenderFunction ".html" = id getRenderFunction ext = writeHtmlString writerOptions - . readFunction ext defaultParserState + . readFunction ext readerOptions where readFunction ".rst" = readRST readFunction ".tex" = readLaTeX |