]> git.notmuchmail.org Git - notmuch/commitdiff
nmbug-status: Anchor with h3 ids instead of a names
authorW. Trevor King <wking@tremily.us>
Thu, 13 Feb 2014 16:47:16 +0000 (08:47 -0800)
committerDavid Bremner <david@tethera.net>
Fri, 14 Feb 2014 01:44:13 +0000 (21:44 -0400)
HTML 5 allows id attributes on all HTML elements [1], but restricts
names to particular cases [2].  Attaching the id attribute to the h3
element allows us to drop the anchor a element altogether.

[1]: http://www.w3.org/TR/html5/dom.html#the-id-attribute
[2]: http://www.w3.org/TR/html5/index.html#attributes-1

devel/nmbug/nmbug-status

index 873a46a890d6250d522ef88eeff9e021e81c81dc..40e68962d111ee0ce35a5813daa544f7857e8d9b 100755 (executable)
@@ -177,7 +177,7 @@ class HtmlPage (Page):
         stream.write('</ul>\n')
 
     def _write_view_header(self, view, stream):
-        stream.write('<h3><a name="{title}" />{title}</h3>\n'.format(**view))
+        stream.write('<h3 id="{title}">{title}</h3>\n'.format(**view))
         if 'comment' in view:
             stream.write(view['comment'])
             stream.write('\n')