diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-10-30 10:50:18 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-10-30 10:54:07 -0700 |
commit | 532ae22c290b40932c1797b19b9cb4248ec543f6 (patch) | |
tree | fd3e27e39a5442c0952c9eb2e39b84ed857396fc /src | |
parent | d1ba023d9e747a890b2957326d4d3441c23805e6 (diff) | |
download | pandoc-532ae22c290b40932c1797b19b9cb4248ec543f6.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Textile.hs | 7 |
1 files changed, 4 insertions, 3 deletions
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 |