git.iko.soy/typeable/pandoc
on master help sign in
Fixed bug in smart quote recognition: ' before ) or certain

other punctuation must not be an open quote. git-svn-id: https://pandoc.googlecode.com/svn/trunk@496 788f1e2b-df1e-0410-8736-df70ead52e1b

commit8c257385ac83206dac5f22b399079d14dcb353cc authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 16 Jan 2007, 23:46 (20 years ago) parentf3cf1cc
1 file changed+4−3
src/Text/Pandoc/Readers/Markdown.hs+4−3
src/Text/Pandoc/Readers/Markdown.hs+4−3
@@ -776,13 +776,14 @@ failIfInQuoteContext context = do
776776 then fail "already inside quotes"
777777 else return ()
778778
779−singleQuoteStart = do
779+singleQuoteStart = try $ do
780780 failIfInQuoteContext InSingleQuote
781781 char '\'' <|> char '\8216'
782+ notFollowedBy (oneOf ")!],.;:-?")
782783
783−singleQuoteEnd = try (do
784+singleQuoteEnd = try $ do
784785 char '\'' <|> char '\8217'
785− notFollowedBy alphaNum)
786+ notFollowedBy alphaNum
786787
787788doubleQuoteStart = do
788789 failIfInQuoteContext InDoubleQuote