From 376c911ff8aac92703fccb365d85799f806ab969 Mon Sep 17 00:00:00 2001 From: Mark Lentczner Date: Sat, 4 Sep 2010 23:19:47 +0000 Subject: make TOC group header identifiers validate --- src/Haddock/Backends/Xhtml/Utils.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Haddock/Backends/Xhtml') diff --git a/src/Haddock/Backends/Xhtml/Utils.hs b/src/Haddock/Backends/Xhtml/Utils.hs index 10f9e766..f0b6941c 100644 --- a/src/Haddock/Backends/Xhtml/Utils.hs +++ b/src/Haddock/Backends/Xhtml/Utils.hs @@ -15,6 +15,7 @@ module Haddock.Backends.Xhtml.Utils ( namedAnchor, linkedAnchor, spliceURL, + groupId, (<+>), char, nonEmpty, keyword, punctuate, @@ -172,6 +173,10 @@ linkedAnchor :: String -> Html -> Html linkedAnchor n = anchor ! [href ('#':n)] +-- | generate an anchor identifier for a group +groupId :: String -> String +groupId g = makeAnchorId ("g:" ++ g) + -- -- A section of HTML which is collapsible. -- -- cgit v1.2.3