From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +KhiAYsTYF95PQAA0tVLHw (envelope-from ) for ; Tue, 15 Sep 2020 01:06:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iI5XN4oTYF8WLwAAB5/wlQ (envelope-from ) for ; Tue, 15 Sep 2020 01:06:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BB616940221 for ; Tue, 15 Sep 2020 01:06:17 +0000 (UTC) Received: from localhost ([::1]:48388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHzQF-0001an-VK for larch@yhetil.org; Mon, 14 Sep 2020 21:06:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHzQ3-0001YI-0m for bug-guix@gnu.org; Mon, 14 Sep 2020 21:06:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45157) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHzQ2-0003hH-O6 for bug-guix@gnu.org; Mon, 14 Sep 2020 21:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kHzQ2-0007ZO-Je for bug-guix@gnu.org; Mon, 14 Sep 2020 21:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43166: The issues.guix.gnu.org is hard to read in emacs-w3m. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 15 Sep 2020 01:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43166 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun X-Debbugs-Original-Cc: Mark H Weaver , bug-guix@gnu.org, Vitaliy Shatrov , Maxim Cournoyer , 43166@debbugs.gnu.org Received: via spool by 43166-submit@debbugs.gnu.org id=B43166.160013193629049 (code B ref 43166); Tue, 15 Sep 2020 01:06:02 +0000 Received: (at 43166) by debbugs.gnu.org; 15 Sep 2020 01:05:36 +0000 Received: from localhost ([127.0.0.1]:56702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHzPb-0007YN-Fl for submit@debbugs.gnu.org; Mon, 14 Sep 2020 21:05:35 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHzPX-0007Y5-EX for 43166@debbugs.gnu.org; Mon, 14 Sep 2020 21:05:33 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1600131922; cv=none; d=zohomail.com; s=zohoarc; b=XxmJQgxaT1c7pSA4pL/4EEC11nwpio36C1QO6x7HRfRHoitAZVHmlNNRq4rLAzYbchitqbsUwNgBxYTieceZ1SAbcd7qgw9NqtYU89oEHPG1ezXKMlGhYkPin9Z7uTQM8pnRtknqbGYHui3NDE4S06su/FZSoBez4MPfd7hqJJg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600131922; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=oV22Fy3c0WxGtgH6aM95E42NszsSfIkNFzV3PcipB+s=; b=bTKuD91DEKQU9D8eMr7XqzU/TOQElBmei7G6KuJJ87EOuyGYL4V1HwkPB0JeCKeVW+w7gANqBKxvaROphzQuE4cfPYGD/ZANBOS5qa1Z4dpM7onCodNbLXXsl1urnLQYQuCFJR9B/vZ2OnVrliwygFlkADmclxwhsNbwW5EG2Zc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1600131922; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type; bh=oV22Fy3c0WxGtgH6aM95E42NszsSfIkNFzV3PcipB+s=; b=U+avxa4pl4ytDyCBQuWZ/gUW0zKvfqzP+keC4TxtYG7y5HjdIFby8OD3afC7ZBbG b6tbfCZsu7MGrUoAEwJiGm2T2qWLNrrXzl1OgWcMTrhJZj8NZtZDtTHx7G8aZIyICuH KDMeGyYtgLgn68N3AAm+yuR/czPTX2CgJ7Xn30vg= Received: from localhost (p54ad4ca1.dip0.t-ipconnect.de [84.173.76.161]) by mx.zohomail.com with SMTPS id 1600131920836417.52301185900774; Mon, 14 Sep 2020 18:05:20 -0700 (PDT) References: <73F56D6B-6448-44C2-8EB9-23AE854AD4CF@disroot.org> <87o8mk71f4.fsf@disroot.org> <87ft7k5x45.fsf@gmail.com> <87een4f571.fsf@netris.org> <874ko0xby5.fsf@elephly.net> User-agent: mu4e 1.4.13; emacs 27.1 From: Ricardo Wurmus In-reply-to: <874ko0xby5.fsf@elephly.net> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Tue, 15 Sep 2020 03:06:38 +0200 Message-ID: <87v9gfx2zl.fsf@elephly.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-ZohoMailClient: External X-Zoho-Virus-Status: 1 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: maxim.cournoyer@gmail.com, guix.vits@disroot.org, 43166@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=elephly.net header.s=zoho header.b=U+avxa4p; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 3.49 X-TUID: +LxIXzCr6fT6 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The attached patch seems to fix the worst problems. I=E2=80=99m marking up each line in a message with a =E2=80=9Cspan=E2=80=9D= tag and a =E2=80=9Cline=E2=80=9D class; then I use CSS to visually separate the lines. Simple browsers that don=E2=80=99t support this CSS rely on =E2=80=9Cspan=E2=80=9D to be an= inline tag; likewise they rely on =E2=80=9Cdiv=E2=80=9D to be a block tag, no matter what the CS= S might say. So the attached patch changes the tag from =E2=80=9Cspan=E2=80=9D to =E2=80= =9Cdiv=E2=80=9D, so simple browsers will render each line on their own instead of joining them. This seems to have no negative impact on the rendering in other browsers. It also shouldn=E2=80=99t be a problem going forward, as popular powerful browsers allow me to style these =E2=80=9Cdiv=E2=80=9D tags without limitations. What do you think? --=20 Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=p.patch diff --git a/assets/css/screen.css b/assets/css/screen.css index 684bc01..5d8513d 100644 --- a/assets/css/screen.css +++ b/assets/css/screen.css @@ -353,28 +353,28 @@ details { display: none; } -.message span.line { +.message div.line { white-space: pre-wrap; font-family: monospace; display: block; } /* diff styles */ -.message .diff span.line.diff.file { +.message .diff div.line.diff.file { color: #005cc5; } -.message .diff span.line.diff.separator { +.message .diff div.line.diff.separator { color: #005cc5; } -.message .diff span.line.diff.addition { +.message .diff div.line.diff.addition { color: #22863a; background-color: #f0fff4; } -.message .diff span.line.diff.deletion { +.message .diff div.line.diff.deletion { color: #b31d28; background-color: #ffeef0; } -.message .diff span.line.diff.range { +.message .diff div.line.diff.range { color: #6f42c1; font-weight: bold; } @@ -394,7 +394,7 @@ details { } /* quote styles */ -.message .quote span.line { +.message .quote div.line { color: #3868cc; } diff --git a/mumi/web/view/utils.scm b/mumi/web/view/utils.scm index 3c95644..4a4ecb0 100644 --- a/mumi/web/view/utils.scm +++ b/mumi/web/view/utils.scm @@ -68,7 +68,7 @@ with the next context." (if (string-prefix? "--8<---------------cut here" line) (values blocks #f) (values (cons (add-block-line! block - `(span (@ (class "line")) ,line)) + `(div (@ (class "line")) ,line)) other-blocks) context))) ((eq? context 'diff) @@ -79,17 +79,17 @@ with the next context." (let ((formatted-line (cond ((string= "---" line) - `(span (@ (class "line diff separator")) ,line)) + `(div (@ (class "line diff separator")) ,line)) ((string-prefix? "+" line) - `(span (@ (class "line diff addition")) ,line)) + `(div (@ (class "line diff addition")) ,line)) ((and (string-prefix? "-" line) (not (string= "--" line)) (not (string= "-- " line))) - `(span (@ (class "line diff deletion")) ,line)) + `(div (@ (class "line diff deletion")) ,line)) ((string-prefix? "@@" line) - `(span (@ (class "line diff range")) ,line)) + `(div (@ (class "line diff range")) ,line)) (else - `(span (@ (class "line")) ,line))))) + `(div (@ (class "line")) ,line))))) (values (cons (add-block-line! block formatted-line) other-blocks) context)))) @@ -97,7 +97,7 @@ with the next context." (if (string-prefix? ">" line) ;; Add line to current block (values (cons (add-block-line! block - `(span (@ (class "line")) ,line)) + `(div (@ (class "line")) ,line)) other-blocks) context) ;; Retry @@ -124,28 +124,28 @@ with the next context." ((uri-string . rest) (or (and=> (string->uri uri-string) (lambda (uri) - `(span (@ (class "line")) - ,(string-trim-right pre #\<) - (a (@ (href ,uri-string)) - ,uri-string) - ,(string-join rest " ")))) - `(span (@ (class "line")) ,line))))))) + `(div (@ (class "line")) + ,(string-trim-right pre #\<) + (a (@ (href ,uri-string)) + ,uri-string) + ,(string-join rest " ")))) + `(div (@ (class "line")) ,line))))))) ((or (string-prefix? "Signed-off-by" line) (string-prefix? "Co-authored-by" line)) - `(span (@ (class "line commit attribution")) ,line)) + `(div (@ (class "line commit attribution")) ,line)) ((or (string-prefix? "From: " line) (string-prefix? "Date: " line) (string-prefix? "Subject: " line)) - `(span (@ (class "line commit header")) ,line)) + `(div (@ (class "line commit header")) ,line)) ((or (string-prefix? "* " line) (string-prefix? " * " line)) - `(span (@ (class "line commit changelog")) ,line)) + `(div (@ (class "line commit changelog")) ,line)) ((string-prefix? "diff --git" line) - `(span (@ (class "line diff file")) ,line)) + `(div (@ (class "line diff file")) ,line)) ((string-prefix? "--8<---------------cut here" line) "") (else - `(span (@ (class "line")) ,line))))) + `(div (@ (class "line")) ,line))))) (if (eq? new-context context) (values (cons (add-block-line! block formatted-line) other-blocks) --=-=-=--