aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index f32a29274..6e327a2ef 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -776,9 +776,13 @@ failIfInQuoteContext context = do
singleQuoteStart = try $ do
failIfInQuoteContext InSingleQuote
- char '\'' <|> char '\8216'
- notFollowedBy (oneOf ")!],.;:-? \t\n")
- notFollowedBy (try (do{oneOf "sS"; satisfy (not . isAlphaNum)}))
+ char '\8216' <|> do
+ char '\''
+ notFollowedBy (oneOf ")!],.;:-? \t\n")
+ notFollowedBy (try (do -- possessive or contraction
+ oneOf "sStT"
+ satisfy (not . isAlphaNum)))
+ return '\''
singleQuoteEnd = try $ do
char '\'' <|> char '\8217'