diff options
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r-- | src/pandoc.hs | 34 |
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 |