git.iko.soy/typeable/pandoc
on master help sign in
Fixed bug in smart quote recognition: ' before ) or certain
8c25738fiddlosopher
src/Text/Pandoc/Readers/Markdown.hs+4−3
@@ -776,13 +776,14 @@ failIfInQuoteContext context = do
776 then fail "already inside quotes"
776 then fail "already inside quotes"
777 else return ()
777 else return ()
778
778
779−singleQuoteStart = do
779+singleQuoteStart = try $ do
780 failIfInQuoteContext InSingleQuote
780 failIfInQuoteContext InSingleQuote
781 char '\'' <|> char '\8216'
781 char '\'' <|> char '\8216'
782+ notFollowedBy (oneOf ")!],.;:-?")
782
783
783−singleQuoteEnd = try (do
784+singleQuoteEnd = try $ do
784 char '\'' <|> char '\8217'
785 char '\'' <|> char '\8217'
785− notFollowedBy alphaNum)
786+ notFollowedBy alphaNum
786
787
787doubleQuoteStart = do
788doubleQuoteStart = do
788 failIfInQuoteContext InDoubleQuote
789 failIfInQuoteContext InDoubleQuote