diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-01-29 20:37:10 +0000 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-01-30 17:22:34 +0100 |
commit | 7d2106e18f26a680d157ef943da2602e7199afa1 (patch) | |
tree | ac57544a578ef9d253ade557e9af083cd19fbdab /test/Haddock/ParserSpec.hs | |
parent | cf73b006faf95512b28c744ecfbdf47c044acb67 (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 'test/Haddock/ParserSpec.hs')
-rw-r--r-- | test/Haddock/ParserSpec.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Haddock/ParserSpec.hs b/test/Haddock/ParserSpec.hs index 9bca745f..455a67f1 100644 --- a/test/Haddock/ParserSpec.hs +++ b/test/Haddock/ParserSpec.hs @@ -410,6 +410,14 @@ spec = before initStaticOpts $ do , "@" ] `shouldParseTo` DocCodeBlock "foo\n@\nbar\n" + it "accepts horizontal space before the @" $ do + unlines [ " @" + , " foo" + , "" + , " bar" + , " @" + ] `shouldParseTo` DocCodeBlock " foo\n\n bar\n " + it "accepts unicode" $ do "@foo 灼眼のシャナ bar@" `shouldParseTo` DocCodeBlock "foo 灼眼のシャナ bar" |