git.iko.soy/typeable/pandoc
on master help sign in
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

commite6cc2aa3cf30cc5179b33974a894f5333167242b authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateWed 24 Jan 2007, 04:49 (20 years ago) parent1121e87
1 file changed+7−3
src/Text/Pandoc/Readers/Markdown.hs+7−3
src/Text/Pandoc/Readers/Markdown.hs+7−3
@@ -776,9 +776,13 @@ failIfInQuoteContext context = do
776776
777777singleQuoteStart = try $ do
778778 failIfInQuoteContext InSingleQuote
779− char '\'' <|> char '\8216'
780− notFollowedBy (oneOf ")!],.;:-? \t\n")
781− notFollowedBy (try (do{oneOf "sS"; satisfy (not . isAlphaNum)}))
779+ char '\8216' <|> do
780+ char '\''
781+ notFollowedBy (oneOf ")!],.;:-? \t\n")
782+ notFollowedBy (try (do -- possessive or contraction
783+ oneOf "sStT"
784+ satisfy (not . isAlphaNum)))
785+ return '\''
782786
783787singleQuoteEnd = try $ do
784788 char '\'' <|> char '\8217'