aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml/DocMarkup.hs
diff options
context:
space:
mode:
authorMark Lentczner <markl@glyphic.com>2010-07-27 21:06:34 +0000
committerMark Lentczner <markl@glyphic.com>2010-07-27 21:06:34 +0000
commitb99698a292a1475d1b7c3f49b2a4fccb9994ca7c (patch)
treee44d2e33b05c75248c8d41348c79f105360c2ae0 /src/Haddock/Backends/Xhtml/DocMarkup.hs
parentccb3be7d8d24eda2b5d871b96966049f2f1a7fc3 (diff)
give a class to empty dd elements so they can be hidden
Diffstat (limited to 'src/Haddock/Backends/Xhtml/DocMarkup.hs')
-rw-r--r--src/Haddock/Backends/Xhtml/DocMarkup.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Haddock/Backends/Xhtml/DocMarkup.hs b/src/Haddock/Backends/Xhtml/DocMarkup.hs
index 3ed36ed9..b1260a9c 100644
--- a/src/Haddock/Backends/Xhtml/DocMarkup.hs
+++ b/src/Haddock/Backends/Xhtml/DocMarkup.hs
@@ -90,8 +90,11 @@ rdrDocToHtml = markup fmt . cleanup
where fmt = parHtmlMarkup ppRdrName isRdrTc
-docElement :: (ADDATTRS a) => a -> a
-docElement = (! [theclass "doc"])
+docElement :: (Html -> Html) -> Html -> Html
+docElement el content_ =
+ if isNoHtml content_
+ then el ! [theclass "doc empty"] << spaceHtml
+ else el ! [theclass "doc"] << content_
docSection :: Doc DocName -> Html