diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-04-28 23:30:16 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-04-28 23:32:37 -0700 |
commit | 80e2e88287f43d88ea92a77779b25e161c81f67b (patch) | |
tree | 91089036dc579894ac5eb837475bfa4a6291d9d7 /src/Text/Pandoc/Readers/RST.hs | |
parent | 8fe7e8dd5c2667f0cac5af67ff1a02872eeb9933 (diff) | |
download | pandoc-80e2e88287f43d88ea92a77779b25e161c81f67b.tar.gz |
Smarter smart quotes.
Treat a leading " with no closing " as a left curly quote.
This supports the practice, in fiction, of continuing
paragraphs quoting the same speaker without an end quote.
It also helps with quotes that break over lines in line
blocks.
Closes #7216.
Diffstat (limited to 'src/Text/Pandoc/Readers/RST.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 514e3b88d..ac4c0b6cb 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -1658,21 +1658,4 @@ note = try $ do return $ B.note contents smart :: PandocMonad m => RSTParser m Inlines -smart = do - guardEnabled Ext_smart - doubleQuoted <|> singleQuoted <|> - choice [apostrophe, dash, ellipses] - -singleQuoted :: PandocMonad m => RSTParser m Inlines -singleQuoted = try $ do - singleQuoteStart - withQuoteContext InSingleQuote $ - B.singleQuoted . trimInlines . mconcat <$> - many1Till inline singleQuoteEnd - -doubleQuoted :: PandocMonad m => RSTParser m Inlines -doubleQuoted = try $ do - doubleQuoteStart - withQuoteContext InDoubleQuote $ - B.doubleQuoted . trimInlines . mconcat <$> - many1Till inline doubleQuoteEnd +smart = smartPunctuation inline |