From 122fe6edaeae55e77d606e6d57aa1904bbfb55c4 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sun, 2 Nov 2014 12:19:38 +0800 Subject: Allow an optional colon after the closing bracket of definition lists This is to disambiguate them from markdown links and will be require with a future release. --- haddock-library/src/Documentation/Haddock/Parser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'haddock-library/src/Documentation/Haddock/Parser.hs') diff --git a/haddock-library/src/Documentation/Haddock/Parser.hs b/haddock-library/src/Documentation/Haddock/Parser.hs index ff03c7bb..99010897 100644 --- a/haddock-library/src/Documentation/Haddock/Parser.hs +++ b/haddock-library/src/Documentation/Haddock/Parser.hs @@ -294,7 +294,7 @@ definitionList :: Parser (DocH mod Identifier) definitionList = DocDefList <$> p where p = do - label <- "[" *> (parseStringBS <$> takeWhile1 (`notElem` "]\n")) <* "]" + label <- "[" *> (parseStringBS <$> takeWhile1 (`notElem` "]\n")) <* ("]" <* optional ":") c <- takeLine (cs, items) <- more p let contents = parseString . dropNLs . unlines $ c : cs -- cgit v1.2.3