summaryrefslogtreecommitdiff
path: root/src/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-07-25 22:35:41 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-07-25 22:35:41 -0700
commitacde1e82d2f070ceab8d0fd01ad3677c6c9e078c (patch)
treecc067dff2c2d81d4d30afbcd513e39c5cb2951dd /src/pandoc.hs
parent9b5d2031c7d643de3397da2e4f38b2f6b45feb64 (diff)
Changed reader parameters from ParserState to ReaderOptions.
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r--src/pandoc.hs34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs
index 72b13beb8..d889913d2 100644
--- a/src/pandoc.hs
+++ b/src/pandoc.hs
@@ -936,23 +936,21 @@ main = do
then "."
else takeDirectory (head sources)
- let startParserState = def{ stateOptions = def{
- readerStrict = strict
- , readerSmart = smart || (texLigatures &&
- (laTeXOutput || writerName' == "context"))
- , readerStandalone = standalone'
- , readerParseRaw = parseRaw
- , readerColumns = columns
- , readerTabStop = tabStop
- , readerOldDashes = oldDashes
- , readerLiterateHaskell =
- "+lhs" `isSuffixOf` readerName' ||
- lhsExtension sources
- , readerCitations = map CSL.refId refs
- , readerIndentedCodeClasses = codeBlockClasses
- , readerApplyMacros = not laTeXOutput
- }
- }
+ let readerOpts = def{ readerStrict = strict
+ , readerSmart = smart || (texLigatures &&
+ (laTeXOutput || writerName' == "context"))
+ , readerStandalone = standalone'
+ , readerParseRaw = parseRaw
+ , readerColumns = columns
+ , readerTabStop = tabStop
+ , readerOldDashes = oldDashes
+ , readerLiterateHaskell =
+ "+lhs" `isSuffixOf` readerName' ||
+ lhsExtension sources
+ , readerCitations = map CSL.refId refs
+ , readerIndentedCodeClasses = codeBlockClasses
+ , readerApplyMacros = not laTeXOutput
+ }
let writerOptions = def { writerStandalone = standalone',
writerTemplate = templ,
@@ -1013,7 +1011,7 @@ main = do
then handleIncludes
else return
- doc <- (reader startParserState) `fmap` (readSources sources >>=
+ doc <- (reader readerOpts) `fmap` (readSources sources >>=
handleIncludes' . convertTabs . intercalate "\n")
let doc0 = foldr ($) doc transforms