aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-01-29 20:37:10 +0000
committerHerbert Valerio Riedel <hvr@gnu.org>2014-01-30 17:22:34 +0100
commit7d2106e18f26a680d157ef943da2602e7199afa1 (patch)
treeac57544a578ef9d253ade557e9af083cd19fbdab /src/Haddock
parentcf73b006faf95512b28c744ecfbdf47c044acb67 (diff)
Fix @ code blocks
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.
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Parser.hs1
1 files changed, 1 insertions, 0 deletions
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)