From f6e5d57bee5a7bf5d74d26982db64fa8a56f17bd Mon Sep 17 00:00:00 2001 From: Sebastian Meric de Bellefon Date: Sun, 15 May 2016 01:12:28 -0400 Subject: Fix #280. Parsing of module header The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines --- haddock-api/src/Haddock/Interface/ParseModuleHeader.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'haddock-api/src/Haddock/Interface/ParseModuleHeader.hs') diff --git a/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs b/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs index e7d2a085..768a31ce 100644 --- a/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs +++ b/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs @@ -76,7 +76,7 @@ parseKey :: String -> String -> Maybe (String,String) parseKey key toParse0 = do let - (spaces0,toParse1) = extractLeadingSpaces toParse0 + (spaces0,toParse1) = extractLeadingSpaces (dropWhile (`elem` ['\r', '\n']) toParse0) indentation = spaces0 afterKey0 <- extractPrefix key toParse1 -- cgit v1.2.3