diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs | 5 | ||||
-rw-r--r-- | html-test/ref/Bug335.html | 6 |
3 files changed, 8 insertions, 5 deletions
@@ -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</a > :: ()</p ><div class="doc" - ><h3 id="control.ch:f0" class="caption collapser" onclick="toggleSection('ch:f0')" + ><h3 id="control.ch:f0" class="caption expander" onclick="toggleSection('ch:f0')" >ExF:</h3 ><div id="section.ch:f0" class="hide" ><p @@ -78,7 +78,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug335.html");}; >g</a > :: ()</p ><div class="doc" - ><h3 id="control.ch:g0" class="caption collapser" onclick="toggleSection('ch:g0')" + ><h3 id="control.ch:g0" class="caption expander" onclick="toggleSection('ch:g0')" >ExG:</h3 ><div id="section.ch:g0" class="hide" ><pre class="screen" @@ -118,7 +118,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug335.html");}; ><p >Produced by <a href="" >Haddock</a - > version 2.16.0</p + > version 2.16.1</p ></div ></body ></html |