From d14c5f94df490996d12f8a56e29f927b9f9549e8 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 29 Apr 2021 08:48:49 -0700 Subject: Further improvements in smart quotes. Improves heuristic for detection of an "open double quote." Closes #2103. --- src/Text/Pandoc/Parsing.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 2f6189104..37ab0adaa 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -1447,7 +1447,7 @@ singleQuoteStart = do guard =<< notAfterString try $ do charOrRef "'\8216\145" - notFollowedBy (satisfy isSpaceChar) + void $ lookAhead (satisfy (not . isSpaceChar)) singleQuoteEnd :: Stream s m Char => ParserT s st m () @@ -1463,7 +1463,7 @@ doubleQuoteStart = do failIfInQuoteContext InDoubleQuote guard =<< notAfterString try $ do charOrRef "\"\8220\147" - notFollowedBy (satisfy isSpaceChar) + void $ lookAhead (satisfy (not . isSpaceChar)) doubleQuoteEnd :: Stream s m Char => ParserT s st m () -- cgit v1.2.3