aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-07-25 23:49:45 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-07-25 23:49:45 -0700
commit0f0c1579f870248566abe806ff7bb6cc866ab4dc (patch)
treec48d04e419356dd0fffaa7aba6b41342f94ca801 /src/Text/Pandoc
parent499d1257ca75616a83a2d3bd106c3f9ffbbd2452 (diff)
downloadpandoc-0f0c1579f870248566abe806ff7bb6cc866ab4dc.tar.gz
Smart quotes: handle '...hi' properly.
Also added test case.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Parsing.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs
index c16d99bdf..700076a10 100644
--- a/src/Text/Pandoc/Parsing.hs
+++ b/src/Text/Pandoc/Parsing.hs
@@ -759,7 +759,8 @@ singleQuoteStart :: GenParser Char ParserState ()
singleQuoteStart = do
failIfInQuoteContext InSingleQuote
try $ do charOrRef "'\8216\145"
- notFollowedBy (oneOf ")!],.;:-? \t\n")
+ notFollowedBy (oneOf ")!],;:-? \t\n")
+ notFollowedBy (char '.') <|> lookAhead (string "..." >> return ())
notFollowedBy (try (oneOfStrings ["s","t","m","ve","ll","re"] >>
satisfy (not . isAlphaNum)))
-- possess/contraction