Bugzilla – Bug 437
"h1" is not linked in messages
Last modified: 2009-04-15 12:41:55 CEST
Try e.g. <h1><asdf>
You may want to go through all elements in HTML5 and make sure they're linked correctly.
hmm, I notice that <body> is not linked either
I'd be glad to go through and add the hyperlink generation for any elements that still need it, but I'm wondering if there might be an automated way to determine which elements are currently lacking it.
I think the cause of the problem here is just something to specific to only h1-h6: There is no separate section in the spec only for h1; instead, there's a single h1-h6 section with all of them lumped together: like this: <h4 id=the-h1,-h2,-h3,-h4,-h5,-and-h6-elements><span class=secno>4.4.6 </span>The <dfn><code>h1</code></dfn>, <dfn><code>h2</code></dfn> etc.
I don't think the current spec-scraping code expects that case. So it needs to be updated to handle it.
Also see sub and sup.
*** Bug 350 has been marked as a duplicate of this bug. ***
Created attachment 80 [details]
patch with proposed fix
This patch fixes the specific h1 problem as well as the sub/sup problem and the general problem that links will not get generated correctly for any other h4 element-section titles that contain multiple <code> children (element names).
I'm certain this is not the most elegant or efficient way to do this, but I've tested it and it does work as expected, and as far as I can see is not any more fragile than the previous code.
Note that this needs to be run against the latest version of the spec (instead of the 2008-11 version that's currently in whattf subversion) -- because there are some differences that will break the build if run against older versions of the spec; in particular, the attributes dt is now "Content attributes" instead of "Element-specific attributes".
Created attachment 81 [details]
...needs the DOTALL field set to deal with the case of h4s with embedded linebreaks
Created attachment 82 [details]
Created attachment 83 [details]
updated to fix problem variable name a literal in message string
Comment on attachment 82 [details]
flubbed when I hit submit... ignore this patch... fingers cold