[Haddock] [haddock] #186: invalid xhtml being generated

haddock haddock at projects.haskell.org
Mon Nov 7 09:21:49 GMT 2011


#186: invalid xhtml being generated
-------------------+--------------------------------------------------------
Reporter:  Phyx    |       Owner:        
    Type:  defect  |      Status:  new   
Priority:  major   |   Milestone:  2.10.0
 Version:  2.9.2   |    Keywords:        
-------------------+--------------------------------------------------------
 I'm adding a new backend to haddock and am consuming the xhtml being
 generated by the html backend. While doing so I've (so far) noticed two
 points where invalid xhtml is being generated:

 1) inside Xhtml.hs line 180 "nonEmpty sectionName"

 "sectionName" already contains a class attribute, and nonEmpty adds
 another one (incorrectly). You end up with 'class="caption" class="empty"'
 instead of 'class="caption empty"'.

 I beleive this is an xhtml issue, and have reported it so
 https://github.com/haskell/xhtml/issues/2
 and have for now created a method emptySectionName which outputs the
 proper classes:

 -- | Make a special empty paragraph with the
 emptySectionName :: Html -> Html
 emptySectionName entry = paragraph ! [theclass "caption empty"] <<
 (spaceHtml +++ entry)

 2) frames.html (the template) is invalid

 # <head> is never closed[[BR]]
 # <title> is ommitted[[BR]]
 # empty <frame> elements are not closed

 I've attached a valid one

-- 
Ticket URL: <http://trac.haskell.org/haddock/ticket/186>
haddock <http://www.haskell.org/haddock>
Haddock, The Haskell Documentation Tool


More information about the Haddock mailing list