From 3a62f96b8ea3a1e897f038373942cd36d8caf5fe Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 5 Apr 2002 14:11:51 +0000 Subject: [haddock @ 2002-04-05 14:11:51 by simonmar] Fix the anchor for a class declaration --- src/HaddockHtml.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index 4310a8dc..82a2c474 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -395,16 +395,15 @@ ppHsClassDecl doc_map True (HsClassDecl loc ty decls) = )) ppHsClassDecl doc_map False decl@(HsClassDecl loc ty decls) = - linkTarget c +++ if null decls - then declBox (ppClassHdr ty) + then declBox (linkTarget c +++ ppClassHdr ty) else td << ( vanillaTable << ( if isJust doc then aboves [header, classdoc, body] else aboves [header, body] )) - where header = declBox (ppClassHdr ty <+> keyword "where") + where header = declBox (linkTarget c +++ ppClassHdr ty <+> keyword "where") classdoc = docBox (markup htmlMarkup (fromJust doc)) meth_hdr = td ! [ theclass "section4" ] << toHtml "Methods" body = td << ( -- cgit v1.2.3