From cf73b006faf95512b28c744ecfbdf47c044acb67 Mon Sep 17 00:00:00 2001 From: "Dr. ERDI Gergo" Date: Fri, 31 Jan 2014 00:15:01 +0800 Subject: <+>: Don't insert a space when concatenating empty nodes --- src/Haddock/Backends/Xhtml/Utils.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Haddock/Backends/Xhtml/Utils.hs') 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 -- cgit v1.2.3