[PATCH v3 1/8] 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 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:59:58 +0000 (09:59 -0800)
9d/56b5c2ba36ca9c2d1d198e6d2b9b810c6a538c [new file with mode: 0644]

diff --git a/9d/56b5c2ba36ca9c2d1d198e6d2b9b810c6a538c b/9d/56b5c2ba36ca9c2d1d198e6d2b9b810c6a538c
new file mode 100644 (file)
index 0000000..bd02433
--- /dev/null
@@ -0,0 +1,96 @@
+Return-Path: <wking@tremily.us>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4A414431FBF\r
+       for <notmuch@notmuchmail.org>; Thu, 13 Feb 2014 08:48:52 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id PBqeXDzgUvSI for <notmuch@notmuchmail.org>;\r
+       Thu, 13 Feb 2014 08:48:46 -0800 (PST)\r
+Received: from qmta06.westchester.pa.mail.comcast.net\r
+       (qmta06.westchester.pa.mail.comcast.net [76.96.62.56])\r
+       by olra.theworths.org (Postfix) with ESMTP id 3959D431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 13 Feb 2014 08:48:46 -0800 (PST)\r
+Received: from omta09.westchester.pa.mail.comcast.net ([76.96.62.20])\r
+       by qmta06.westchester.pa.mail.comcast.net with comcast\r
+       id Roee1n0030SCNGk56sokvJ; Thu, 13 Feb 2014 16:48:44 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta09.westchester.pa.mail.comcast.net with comcast\r
+       id Rsoj1n00B152l3L3VsojEv; Thu, 13 Feb 2014 16:48:44 +0000\r
+Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
+       by odin.tremily.us (Postfix) with ESMTPS id 367F7102DA00;\r
+       Thu, 13 Feb 2014 08:48:42 -0800 (PST)\r
+Received: (nullmailer pid 17983 invoked by uid 1000);\r
+       Thu, 13 Feb 2014 16:47:29 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 1/8] nmbug-status: Anchor with h3 ids instead of a names\r
+Date: Thu, 13 Feb 2014 08:47:16 -0800\r
+Message-Id:\r
+ <8ae05a47ca932b1b1fe51dbf29432963808d6d05.1392309570.git.wking@tremily.us>\r
+X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1\r
+In-Reply-To: <cover.1392309570.git.wking@tremily.us>\r
+References: <cover.1392309570.git.wking@tremily.us>\r
+In-Reply-To: <cover.1392309570.git.wking@tremily.us>\r
+References: <cover.1392309570.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20121106; t=1392310124;\r
+       bh=l6R/xfZ7v4x/z/gWY2dYfpQdKIVgXlITHRJ/Y/QmGqk=;\r
+       h=Received:Received:Received:Received:From:To:Subject:Date:\r
+       Message-Id;\r
+       b=MvthhdXPYDEs2oXsYC03XNNc8V3oen1UwacQm49qmqS5ZQitIwLN3wqV9e1VNrNvK\r
+       TQd4Lhcb0ojx0vfmkZHZIK8kor1qpwYsZfK/K/BybxuDFzxYmFZviBMcbXnBEg5HlV\r
+       HSKJ2diYcKy6Rf0hgg11n/OY9B9aW8yS1wpbFsr2TpoT/yYeV7ETA9Tw7F7ZFn+6Hs\r
+       1vYNqKK/1Zb0wIGtT7Ld0bHM5n/zBwd4e/LVEhii8RC3tjc7MEqWJgpFjziQYnVwpv\r
+       YvsqeyAv58XmkeLWywaq78hrNvUwodYPaUIYS5Cg/TwxltTG95eIY7UHTEiuSjxtCN\r
+       VhA/iJ4ACe+Mw==\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 13 Feb 2014 16:48:52 -0000\r
+\r
+HTML 5 allows id attributes on all HTML elements [1], but restricts\r
+names to particular cases [2].  Attaching the id attribute to the h3\r
+element allows us to drop the anchor a element altogether.\r
+\r
+[1]: http://www.w3.org/TR/html5/dom.html#the-id-attribute\r
+[2]: http://www.w3.org/TR/html5/index.html#attributes-1\r
+---\r
+ devel/nmbug/nmbug-status | 2 +-\r
+ 1 file changed, 1 insertion(+), 1 deletion(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index 873a46a..40e6896 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -177,7 +177,7 @@ class HtmlPage (Page):\r
+         stream.write('</ul>\n')\r
\r
+     def _write_view_header(self, view, stream):\r
+-        stream.write('<h3><a name="{title}" />{title}</h3>\n'.format(**view))\r
++        stream.write('<h3 id="{title}">{title}</h3>\n'.format(**view))\r
+         if 'comment' in view:\r
+             stream.write(view['comment'])\r
+             stream.write('\n')\r
+-- \r
+1.8.5.2.8.g0f6c0d1\r
+\r