diff options
Diffstat (limited to 'haddock-library/src/Documentation/Haddock/Parser/Identifier.hs')
-rw-r--r-- | haddock-library/src/Documentation/Haddock/Parser/Identifier.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs b/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs index b8afb951..4c56be9b 100644 --- a/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs +++ b/haddock-library/src/Documentation/Haddock/Parser/Identifier.hs @@ -1,5 +1,4 @@ {-# LANGUAGE BangPatterns #-} -{-# LANGUAGE ViewPatterns #-} -- | -- Module : Documentation.Haddock.Parser.Identifier -- Copyright : (c) Alec Theriault 2019, @@ -150,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 |