From e787b5712157bb0acbb8d886ef793cda5dc1b821 Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Wed, 14 Mar 2018 14:21:18 +0100 Subject: Make a proper definition for the parser --- haddock-library/src/Documentation/Haddock/Parser.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'haddock-library/src/Documentation/Haddock') diff --git a/haddock-library/src/Documentation/Haddock/Parser.hs b/haddock-library/src/Documentation/Haddock/Parser.hs index 250b7f0d..6cbc3922 100644 --- a/haddock-library/src/Documentation/Haddock/Parser.hs +++ b/haddock-library/src/Documentation/Haddock/Parser.hs @@ -742,10 +742,12 @@ codeblock = | otherwise = Just $ c == '\n' hyperlink :: Parser (DocH mod a) -hyperlink = DocHyperlink . makeLabeled Hyperlink . decodeUtf8 - <$> disallowNewline ("<" *> takeUntil ">") - <|> autoUrl - <|> markdownLink +hyperlink = angleBracketLink <|> markdownLink <|> autoUrl + +angleBracketLink :: Parser (DocH mod a) +angleBracketLink = + DocHyperlink . makeLabeled Hyperlink . decodeUtf8 + <$> disallowNewline ("<" *> takeUntil ">") markdownLink :: Parser (DocH mod a) markdownLink = DocHyperlink <$> linkParser -- cgit v1.2.3