From da3702357dc9a310b460c82411fe5b8c870416d5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 25 Jul 2012 10:45:45 -0700 Subject: Put smart, strict in separate options field in state. This is the beginning of a larger transition that will make Options, not ParserState, the parameter of the read functions. (Options will also be used in writers, in place of WriterOptions.) Next step is to remove strict, replacing it with granular tests for different extensions. --- src/Text/Pandoc/Readers/Textile.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Readers/Textile.hs') diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index 71ba26c8c..5373672b0 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -57,6 +57,7 @@ module Text.Pandoc.Readers.Textile ( readTextile) where import Text.Pandoc.Definition import Text.Pandoc.Shared +import Text.Pandoc.Options import Text.Pandoc.Parsing import Text.Pandoc.Readers.HTML ( htmlTag, isInlineTag, isBlockTag ) import Text.Pandoc.Readers.LaTeX ( rawLaTeXInline, rawLaTeXBlock ) @@ -77,7 +78,10 @@ readTextile state s = parseTextile :: Parser [Char] ParserState Pandoc parseTextile = do -- textile allows raw HTML and does smart punctuation by default - updateState (\state -> state { stateParseRaw = True, stateSmart = True }) + oldOpts <- stateOptions `fmap` getState + updateState $ \state -> state { stateParseRaw = True + , stateOptions = oldOpts{ optionSmart = True } + } many blankline startPos <- getPosition -- go through once just to get list of reference keys and notes -- cgit v1.2.3