From d6aec63c009c4e57181900eb03847d7dc0fc3c7c Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Mon, 28 Jul 2014 13:25:43 +0200 Subject: Catch mid-line URLs. Fixes #314. --- haddock-library/src/Documentation/Haddock/Parser.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 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 805b33f8..68d9ecec 100644 --- a/haddock-library/src/Documentation/Haddock/Parser.hs +++ b/haddock-library/src/Documentation/Haddock/Parser.hs @@ -105,7 +105,7 @@ parseStringBS = parse p where p :: Parser (DocH mod Identifier) p = mconcat <$> many (monospace <|> anchor <|> identifier <|> moduleName - <|> picture <|> hyperlink <|> autoUrl <|> bold + <|> picture <|> hyperlink <|> bold <|> emphasis <|> encodedChar <|> string' <|> skipSpecialChar) @@ -125,7 +125,7 @@ encodedChar = "&#" *> c <* ";" -- Once we have checked for any of these and tried to parse the -- relevant markup, we can assume they are used as regular text. specialChar :: [Char] -specialChar = "_/<@\"&'`#" +specialChar = "_/<@\"&'`# " -- | Plain, regular parser for text. Called as one of the last parsers -- to ensure that we have already given a chance to more meaningful parsers -- cgit v1.2.3