diff options
Diffstat (limited to 'src/Haddock')
-rw-r--r-- | src/Haddock/Backends/Html.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs index a89a9b20..b9922262 100644 --- a/src/Haddock/Backends/Html.hs +++ b/src/Haddock/Backends/Html.hs @@ -1806,8 +1806,16 @@ s8, s15 :: HtmlTable s8 = tda [ theclass "s8" ] << noHtml s15 = tda [ theclass "s15" ] << noHtml + +-- | Generate a named anchor +-- +-- This actually generates two anchor tags, one with the name unescaped, and one +-- with the name URI-escaped. This is needed because Opera 9.52 (and later +-- versions) needs the name to be unescaped, while IE 7 needs it to be escaped. +-- namedAnchor :: String -> Html -> Html -namedAnchor n = anchor ! [name (escapeStr n)] +namedAnchor n = (anchor ! [name n]) . (anchor ! [name (escapeStr n)]) + -- -- A section of HTML which is collapsible via a +/- button. |