aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2017-12-14 01:32:53 -0800
committerAlexander Biehl <alexbiehl@gmail.com>2018-02-01 14:58:18 +0100
commitcabe219d10492e376fcfbfa514ae8a722d5e21e2 (patch)
tree6746942c491aa13b6a4d36cbb2e8adef61651542 /haddock-api
parent4f75be94f45a0e92553eccefe56230c554333ce7 (diff)
Clickable anchors for headings (#716)
See #579. This just adds an <a> tag around the heading, pointing to the heading itself.
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index 55175163..01c08f7a 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -697,7 +697,8 @@ processDeclOneLiner True = Just
processDeclOneLiner False = Just . divTopDecl . declElem
groupHeading :: Int -> String -> Html -> Html
-groupHeading lev id0 = groupTag lev ! [identifier (groupId id0)]
+groupHeading lev id0 = linkedAnchor grpId . groupTag lev ! [identifier grpId]
+ where grpId = groupId id0
groupTag :: Int -> Html -> Html
groupTag lev