aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorSebastian Meric de Bellefon <Sebastian.MericdeBellefon@tritondigital.com>2016-05-15 01:12:28 -0400
committerSebastian Meric de Bellefon <Sebastian.MericdeBellefon@tritondigital.com>2016-05-15 02:12:46 -0400
commitf6e5d57bee5a7bf5d74d26982db64fa8a56f17bd (patch)
treea47da4108c055740b195d9b38352cef51f1185b0 /haddock-api
parent26e6b39de3213969d7de7f8bb3d4a849136866d1 (diff)
Fix #280. Parsing of module header
The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Interface/ParseModuleHeader.hs2
1 files changed, 1 insertions, 1 deletions
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