From 532ae22c290b40932c1797b19b9cb4248ec543f6 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 30 Oct 2015 10:50:18 -0700 Subject: Textile reader: don't do smart punctuation unless explicitly asked. Closes #2480. Note that although smart punctuation is part of the textile spec, it's not always wanted when converting from textile to, say, Markdown. So it seems better to make this an option. --- src/Text/Pandoc/Readers/Textile.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index 83280aa2e..43aaa3f9a 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -79,11 +79,12 @@ readTextile opts s = -- | Generate a Pandoc ADT from a textile document parseTextile :: Parser [Char] ParserState Pandoc parseTextile = do - -- textile allows raw HTML and does smart punctuation by default + -- textile allows raw HTML and does smart punctuation by default, + -- but we do not enable smart punctuation unless it is explicitly + -- asked for, for better conversion to other light markup formats oldOpts <- stateOptions `fmap` getState updateState $ \state -> state{ stateOptions = - oldOpts{ readerSmart = True - , readerParseRaw = True + oldOpts{ readerParseRaw = True , readerOldDashes = True } } many blankline -- cgit v1.2.3