From dfa19061abc24a3e95b9b37e4f9484d902110899 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 25 Jul 2012 11:08:06 -0700 Subject: Options -> ReaderOptions. Better to keep reader and writer options separate. --- src/Text/Pandoc/Parsing.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Parsing.hs') diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 2d0fef7c3..3ed2644ba 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -392,7 +392,7 @@ nullBlock = anyChar >> return Null failIfStrict :: Parsec [a] ParserState () failIfStrict = do state <- getState - if optionStrict (stateOptions state) then fail "strict mode" else return () + if readerStrict (stateOptions state) then fail "strict mode" else return () -- | Fail unless we're in literate haskell mode. failUnlessLHS :: Parsec [tok] ParserState () @@ -689,7 +689,7 @@ testStringWith parser str = UTF8.putStrLn $ show $ -- | Parsing options. data ParserState = ParserState - { stateOptions :: Options, -- ^ User options + { stateOptions :: ReaderOptions, -- ^ User options stateParseRaw :: Bool, -- ^ Parse raw HTML and LaTeX? stateParserContext :: ParserContext, -- ^ Inside list? stateQuoteContext :: QuoteContext, -- ^ Inside quoted environment? @@ -795,7 +795,7 @@ lookupKeySrc table key = case M.lookup key table of -- | Fail unless we're in "smart typography" mode. failUnlessSmart :: Parsec [tok] ParserState () -failUnlessSmart = getState >>= guard . optionSmart . stateOptions +failUnlessSmart = getState >>= guard . readerSmart . stateOptions smartPunctuation :: Parsec [Char] ParserState Inline -> Parsec [Char] ParserState Inline -- cgit v1.2.3