From 06e0766810779180dbc52d15c0df5a2eaaf1881e Mon Sep 17 00:00:00 2001
From: Mateusz Kowalczyk
Date: Sat, 11 Jul 2015 14:23:05 +0100
Subject: Fix expansion icon for user-collapsible sections
Closes #412
---
CHANGES | 2 ++
haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs | 5 +++--
html-test/ref/Bug335.html | 6 +++---
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/CHANGES b/CHANGES
index ff49b6f5..be829adf 100644
--- a/CHANGES
+++ b/CHANGES
@@ -23,6 +23,8 @@ Changes in version 2.16.1
* Generate hyperlinked source ourselves (#410, part of GSOC 2015)
+ * Fix expansion icon for user-collapsible sections (#412)
+
Changes in version 2.16.0
* Experimental collapsible header support (#335)
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs b/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
index c23f3f08..3fe74a82 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
@@ -161,8 +161,9 @@ hackMarkup fmt' h' =
UntouchedDoc d -> (markup fmt $ _doc d, [_meta d])
CollapsingHeader (Header lvl titl) par n nm ->
let id_ = makeAnchorId $ "ch:" ++ fromMaybe "noid:" nm ++ show n
- col' = collapseControl id_ True "caption"
- instTable = (thediv ! collapseSection id_ False [] <<)
+ expanded = False
+ col' = collapseControl id_ expanded "caption"
+ instTable = (thediv ! collapseSection id_ expanded [] <<)
lvs = zip [1 .. ] [h1, h2, h3, h4, h5, h6]
getHeader = fromMaybe caption (lookup lvl lvs)
subCaption = getHeader ! col' << markup fmt titl
diff --git a/html-test/ref/Bug335.html b/html-test/ref/Bug335.html
index 6f3d3820..dbe97422 100644
--- a/html-test/ref/Bug335.html
+++ b/html-test/ref/Bug335.html
@@ -64,7 +64,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug335.html");};
>f :: ()
ExF:
g :: ()
ExG:
Produced by Haddock version 2.16.0
version 2.16.1