From nobody Sat Apr 20 11:50:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1520496077403551.5278170203517; Thu, 8 Mar 2018 00:01:17 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7546881DF0; Thu, 8 Mar 2018 08:01:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63FF16134B; Thu, 8 Mar 2018 08:01:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 55D594CA99; Thu, 8 Mar 2018 08:01:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2880q5l032349 for ; Thu, 8 Mar 2018 03:00:52 -0500 Received: by smtp.corp.redhat.com (Postfix) id 10C849F6F; Thu, 8 Mar 2018 08:00:52 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 093159F6E for ; Thu, 8 Mar 2018 08:00:48 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D92E480F6C for ; Thu, 8 Mar 2018 08:00:46 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id t6so9290588wmt.5 for ; Thu, 08 Mar 2018 00:00:46 -0800 (PST) Received: from donizetti.lan (94-36-191-219.adsl-ull.clienti.tiscali.it. [94.36.191.219]) by smtp.gmail.com with ESMTPSA id b9sm21755912wrh.68.2018.03.08.00.00.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Mar 2018 00:00:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=N0GVbxiXNH+ISThVMNHH1tYVNVLHqNULUdIk7uOb6ek=; b=iJsUhVLfJZpwSVGHvVHJfpq9gl2d+8w6w2G1ZVifwXKr+Uf+LiGZmETtmPiBUPHzOX 6xaH83FBJUe1NGLCq+GuZr5tPehsmQxZGqotQ4Tzo60UW+VIIB9VFbwOKki2xAeDQdWc xBfUjbAfI0acKnXs/suhvfbsSMT504JF9bMN9rvCyVPaInW7Kkv9/t6AZbrW43BKJPlj +Z8CT7rJTaxXozY4evmLWTRTwuMKpysgZ0me062PMnjaimxUB0VQvZyXevTeEbMrpIhu O2xIJt5VfLeF9cjizddkxnjFbHgVk8ztOLZUx0dAPrCnLdK04p+J/EvXArM+QDGO3iUK x6sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=N0GVbxiXNH+ISThVMNHH1tYVNVLHqNULUdIk7uOb6ek=; b=UTLmNq53lWDEtd9MDoMK03LrKv5BoM28ewYJ5Oxz3mbHcepU6y2op3lCDkn7k1wEDJ YuWqmDXgiuAfiAV+mo9cDpJknGkW2LiKUf1RopDrEBbjtNRXD6yYRAVi09DlN+UvCAJ/ B+z3ytkGo15pCazCmPKoFUB20Cg7j0n7k/bDLLM/+Mlf7BOaYyuD+7gCfRBimbK2FvzH IaSfNFbEa4cNWYZyPmu8Ux5vonFRS+5sS7h77l2XdmZTSv/ZCRBW3tQHKDVLQNtPAxfE 7wDDrGuTBMxf95Gh3Pe61718aZj82inufX+RW4XEtHJ0Bfcm8sfS2rr+peBu+ToLjQSB KInQ== X-Gm-Message-State: AElRT7HiIOiMnFJBe2ufoo7NUC+QYjUPMObqErgN4kwHZbSEl+75NBJ/ SeQ1bYpUy9yQN8SXxk8g+wwAPdyp X-Google-Smtp-Source: AG47ELuAthZ0aHtteKHJMBpkCijmA3acrrD92IAmkvoIKmg/TucedGLWjx8K08sggRV51zPIuCIatA== X-Received: by 10.28.191.90 with SMTP id p87mr15014333wmf.145.1520496045160; Thu, 08 Mar 2018 00:00:45 -0800 (PST) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Thu, 8 Mar 2018 09:00:36 +0100 Message-Id: <20180308080042.19342-2-pbonzini@redhat.com> In-Reply-To: <20180308080042.19342-1-pbonzini@redhat.com> References: <20180308080042.19342-1-pbonzini@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 08 Mar 2018 08:00:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 08 Mar 2018 08:00:47 +0000 (UTC) for IP:'74.125.82.68' DOMAIN:'mail-wm0-f68.google.com' HELO:'mail-wm0-f68.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.469 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 74.125.82.68 mail-wm0-f68.google.com 74.125.82.68 mail-wm0-f68.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 1/7] ansi2html: add _write_form_feed X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 08 Mar 2018 08:01:16 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Form feeds are rendered differently by HTML and text converters, so move the HTML rendering out of _write_line's argument. Signed-off-by: Paolo Bonzini --- patchew/logviewer.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/patchew/logviewer.py b/patchew/logviewer.py index bf67149..ab5f5c3 100644 --- a/patchew/logviewer.py +++ b/patchew/logviewer.py @@ -197,6 +197,9 @@ class ANSI2HTMLConverter(object): # the remaining light colors: dark grey and white self.bg =3D arg - 92 =20 + def _write_form_feed(self): + yield '
' + def _class_to_id(self, html_class): class_id =3D self.class_to_id.get(html_class, None) if class_id is None: @@ -319,7 +322,8 @@ class ANSI2HTMLConverter(object): =20 if csi[-1] =3D=3D 'J': save_pos =3D self.pos - yield from self._write_line('
') + yield from self._write_line('') + yield from self._write_form_feed() self._set_pos(save_pos) elif csi[-1] =3D=3D 'K': self._parse_csi_with_args(csi, self._do_csi_K) @@ -346,7 +350,8 @@ class ANSI2HTMLConverter(object): yield from self._write_line('\n') continue elif seq =3D=3D '\f': - yield from self._write_line('\n
') + yield from self._write_line('\n') + yield from self._write_form_feed() continue =20 if self.lazy_contents !=3D '': --=20 2.14.3 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel