From 8c257385ac83206dac5f22b399079d14dcb353cc Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 16 Jan 2007 23:46:33 +0000 Subject: Fixed bug in smart quote recognition: ' before ) or certain other punctuation must not be an open quote. git-svn-id: https://pandoc.googlecode.com/svn/trunk@496 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/Markdown.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index f8071a2b7..14dcd5d66 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -776,13 +776,14 @@ failIfInQuoteContext context = do then fail "already inside quotes" else return () -singleQuoteStart = do +singleQuoteStart = try $ do failIfInQuoteContext InSingleQuote char '\'' <|> char '\8216' + notFollowedBy (oneOf ")!],.;:-?") -singleQuoteEnd = try (do +singleQuoteEnd = try $ do char '\'' <|> char '\8217' - notFollowedBy alphaNum) + notFollowedBy alphaNum doubleQuoteStart = do failIfInQuoteContext InDoubleQuote -- cgit v1.2.3