diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-24 04:49:36 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-24 04:49:36 +0000 |
commit | e6cc2aa3cf30cc5179b33974a894f5333167242b (patch) | |
tree | 7eeedb0a5cc7174011bc67cf1551b850f3a8f11f /src/Text/Pandoc/Readers | |
parent | 1121e8738b3d2a60c5762be03a2f6b33adae77ab (diff) | |
download | pandoc-e6cc2aa3cf30cc5179b33974a894f5333167242b.tar.gz |
Fixed bug in smart quoting: recognize ' in contractions like
"don't" as not beginning single quoted contexts.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@505 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 10 |
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' |