@@ -760,21 +760,24 @@ failIfInQuoteContext context = do
760760singleQuoteStart = do
761761 failIfInQuoteContext InSingleQuote
762762 char '\8216' <|>
763− do char '\''
764− notFollowedBy (oneOf ")!],.;:-? \t\n")
765− notFollowedBy (try (oneOfStrings ["s","t","m","ve","ll","re"] >>
766− satisfy (not . isAlphaNum))) -- possess/contraction
767− return '\''
768−
769−singleQuoteEnd = char '\8217' <|>
770− (char '\'' >> notFollowedBy alphaNum >> return '\'')
763+ (try $ do char '\''
764+ notFollowedBy (oneOf ")!],.;:-? \t\n")
765+ notFollowedBy (try (oneOfStrings ["s","t","m","ve","ll","re"] >>
766+ satisfy (not . isAlphaNum)))
767+ -- possess/contraction
768+ return '\'')
769+
770+singleQuoteEnd = try $ do
771+ char '\8217' <|> char '\''
772+ notFollowedBy alphaNum
773+ return '\''
771774
772775doubleQuoteStart = do
773776 failIfInQuoteContext InDoubleQuote
774777 char '\8220' <|>
775− do char '"'
776− notFollowedBy (oneOf " \t\n")
777− return '"'
778+ (try $ do char '"'
779+ notFollowedBy (oneOf " \t\n")
780+ return '"')
778781
779782doubleQuoteEnd = char '\8221' <|> char '"'
780783