From 130b0cb83c00c57731326f766328699c0a699d72 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 14 Feb 2014 08:47:16 +1600 Subject: [PATCH] [PATCH v3 1/8] nmbug-status: Anchor with h3 ids instead of a names --- 9d/56b5c2ba36ca9c2d1d198e6d2b9b810c6a538c | 96 +++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 9d/56b5c2ba36ca9c2d1d198e6d2b9b810c6a538c diff --git a/9d/56b5c2ba36ca9c2d1d198e6d2b9b810c6a538c b/9d/56b5c2ba36ca9c2d1d198e6d2b9b810c6a538c new file mode 100644 index 000000000..bd0243389 --- /dev/null +++ b/9d/56b5c2ba36ca9c2d1d198e6d2b9b810c6a538c @@ -0,0 +1,96 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 4A414431FBF + for ; Thu, 13 Feb 2014 08:48:52 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id PBqeXDzgUvSI for ; + Thu, 13 Feb 2014 08:48:46 -0800 (PST) +Received: from qmta06.westchester.pa.mail.comcast.net + (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) + by olra.theworths.org (Postfix) with ESMTP id 3959D431FAE + for ; Thu, 13 Feb 2014 08:48:46 -0800 (PST) +Received: from omta09.westchester.pa.mail.comcast.net ([76.96.62.20]) + by qmta06.westchester.pa.mail.comcast.net with comcast + id Roee1n0030SCNGk56sokvJ; Thu, 13 Feb 2014 16:48:44 +0000 +Received: from odin.tremily.us ([24.18.63.50]) + by omta09.westchester.pa.mail.comcast.net with comcast + id Rsoj1n00B152l3L3VsojEv; Thu, 13 Feb 2014 16:48:44 +0000 +Received: from mjolnir.tremily.us (unknown [192.168.0.140]) + by odin.tremily.us (Postfix) with ESMTPS id 367F7102DA00; + Thu, 13 Feb 2014 08:48:42 -0800 (PST) +Received: (nullmailer pid 17983 invoked by uid 1000); + Thu, 13 Feb 2014 16:47:29 -0000 +From: "W. Trevor King" +To: notmuch@notmuchmail.org +Subject: [PATCH v3 1/8] nmbug-status: Anchor with h3 ids instead of a names +Date: Thu, 13 Feb 2014 08:47:16 -0800 +Message-Id: + <8ae05a47ca932b1b1fe51dbf29432963808d6d05.1392309570.git.wking@tremily.us> +X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1 +In-Reply-To: +References: +In-Reply-To: +References: +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; + s=q20121106; t=1392310124; + bh=l6R/xfZ7v4x/z/gWY2dYfpQdKIVgXlITHRJ/Y/QmGqk=; + h=Received:Received:Received:Received:From:To:Subject:Date: + Message-Id; + b=MvthhdXPYDEs2oXsYC03XNNc8V3oen1UwacQm49qmqS5ZQitIwLN3wqV9e1VNrNvK + TQd4Lhcb0ojx0vfmkZHZIK8kor1qpwYsZfK/K/BybxuDFzxYmFZviBMcbXnBEg5HlV + HSKJ2diYcKy6Rf0hgg11n/OY9B9aW8yS1wpbFsr2TpoT/yYeV7ETA9Tw7F7ZFn+6Hs + 1vYNqKK/1Zb0wIGtT7Ld0bHM5n/zBwd4e/LVEhii8RC3tjc7MEqWJgpFjziQYnVwpv + YvsqeyAv58XmkeLWywaq78hrNvUwodYPaUIYS5Cg/TwxltTG95eIY7UHTEiuSjxtCN + VhA/iJ4ACe+Mw== +Cc: Tomi Ollila +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 13 Feb 2014 16:48:52 -0000 + +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 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status +index 873a46a..40e6896 100755 +--- a/devel/nmbug/nmbug-status ++++ b/devel/nmbug/nmbug-status +@@ -177,7 +177,7 @@ class HtmlPage (Page): + stream.write('\n') + + def _write_view_header(self, view, stream): +- stream.write('

{title}

\n'.format(**view)) ++ stream.write('

{title}

\n'.format(**view)) + if 'comment' in view: + stream.write(view['comment']) + stream.write('\n') +-- +1.8.5.2.8.g0f6c0d1 + -- 2.26.2