From 4073ed3534eea6579869679bdb59ea3322c2a588 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Sun, 8 May 2022 10:19:47 -0400 Subject: fix parsing trailing quotes in backticked identifiers (#1408) (#1483) --- haddock-library/src/Documentation/Haddock/Parser/Identifier.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'haddock-library/src/Documentation') diff --git a/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs b/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs index e39aabdd..4c56be9b 100644 --- a/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs +++ b/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs @@ -149,9 +149,9 @@ takeIdentifier input = listToMaybe $ do | otherwise = Nothing -- | Parse all but the last quote off the front of the input - -- PRECONDITION: T.head t == '\'' + -- PRECONDITION: T.head t `elem` ['\'', '`'] quotes :: Text -> (Int, Text) - quotes t = let !n = T.length (T.takeWhile (== '\'') t) - 1 + quotes t = let !n = T.length (T.takeWhile (`elem` ['\'', '`']) t) - 1 in (n, T.drop n t) -- | Parse an operator off the front of the input -- cgit v1.2.3