aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Parsing.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-04-29 08:48:49 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-04-29 08:48:49 -0700
commitd14c5f94df490996d12f8a56e29f927b9f9549e8 (patch)
tree9272519b7985445b1f4ac42e166ab7b40cdb359d /src/Text/Pandoc/Parsing.hs
parent80e2e88287f43d88ea92a77779b25e161c81f67b (diff)
downloadpandoc-d14c5f94df490996d12f8a56e29f927b9f9549e8.tar.gz
Further improvements in smart quotes.
Improves heuristic for detection of an "open double quote." Closes #2103.
Diffstat (limited to 'src/Text/Pandoc/Parsing.hs')
-rw-r--r--src/Text/Pandoc/Parsing.hs4
1 files changed, 2 insertions, 2 deletions
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 ()