aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorDr. ERDI Gergo <gergo@erdi.hu>2014-01-31 00:15:01 +0800
committerDr. ERDI Gergo <gergo@erdi.hu>2014-01-31 00:15:01 +0800
commitcf73b006faf95512b28c744ecfbdf47c044acb67 (patch)
treec6d96928457fbc2b0b7bcf3c0821154902b30ba0 /src/Haddock
parent96838d249070e1ab55641b6816360a3e6bc909fa (diff)
<+>: Don't insert a space when concatenating empty nodes
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Backends/Xhtml/Utils.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Haddock/Backends/Xhtml/Utils.hs b/src/Haddock/Backends/Xhtml/Utils.hs
index be1fcb9b..232e18cc 100644
--- a/src/Haddock/Backends/Xhtml/Utils.hs
+++ b/src/Haddock/Backends/Xhtml/Utils.hs
@@ -103,7 +103,9 @@ hsep htmls = foldr1 (\a b -> a+++" "+++b) htmls
infixr 8 <+>
(<+>) :: Html -> Html -> Html
-a <+> b = a +++ toHtml " " +++ b
+a <+> b = a +++ sep +++ b
+ where
+ sep = if isNoHtml a || isNoHtml b then noHtml else toHtml " "
keyword :: String -> Html