From 7d2106e18f26a680d157ef943da2602e7199afa1 Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Wed, 29 Jan 2014 20:37:10 +0000 Subject: Fix @ code blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output. --- src/Haddock/Parser.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Haddock/Parser.hs') diff --git a/src/Haddock/Parser.hs b/src/Haddock/Parser.hs index 6370eecb..e9bed2a5 100644 --- a/src/Haddock/Parser.hs +++ b/src/Haddock/Parser.hs @@ -365,6 +365,7 @@ codeblock d = where p isNewline c | isNewline && c == '@' = Nothing + | isNewline && isSpace c = Just isNewline | otherwise = Just $ c == '\n' hyperlink :: Parser (Doc a) -- cgit v1.2.3