diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-06-25 10:01:55 +0200 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-06-25 10:36:54 +0200 |
commit | 526067188c056a5d73e7e44671ca98baf12d666b (patch) | |
tree | 24af2bada672ab2f47938ab76dd3b51f6de3c833 /src/Haddock/Backends/Xhtml/DocMarkup.hs | |
parent | 5412c262f403e52be45d607b34eb3a5806ea2a76 (diff) |
Fix anchors. Closes #308.
Diffstat (limited to 'src/Haddock/Backends/Xhtml/DocMarkup.hs')
-rw-r--r-- | src/Haddock/Backends/Xhtml/DocMarkup.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Haddock/Backends/Xhtml/DocMarkup.hs b/src/Haddock/Backends/Xhtml/DocMarkup.hs index 16d771ca..5e27d9b0 100644 --- a/src/Haddock/Backends/Xhtml/DocMarkup.hs +++ b/src/Haddock/Backends/Xhtml/DocMarkup.hs @@ -42,7 +42,12 @@ parHtmlMarkup qual insertAnchors ppId = Markup { markupIdentifier = thecode . ppId insertAnchors, markupIdentifierUnchecked = thecode . ppUncheckedLink qual, markupModule = \m -> let (mdl,ref) = break (=='#') m - in ppModuleRef (mkModuleName mdl) ref, + -- Accomodate for old style + -- foo\#bar anchors + mdl' = case reverse mdl of + '\\':_ -> init mdl + _ -> mdl + in ppModuleRef (mkModuleName mdl') ref, markupWarning = thediv ! [theclass "warning"], markupEmphasis = emphasize, markupBold = strong, |