From nobody Tue May 13 11:52:16 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 206.53.239.180 is neither permitted nor denied by domain of freelists.org) client-ip=206.53.239.180; envelope-from=patchew-devel-bounce@freelists.org; helo=turing.freelists.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=none (zoho.com: 206.53.239.180 is neither permitted nor denied by domain of freelists.org) smtp.mailfrom=patchew-devel-bounce@freelists.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from turing.freelists.org (turing.freelists.org [206.53.239.180]) by mx.zohomail.com with SMTPS id 1520241398259342.26449464871473; Mon, 5 Mar 2018 01:16:38 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A948B270A3; Mon, 5 Mar 2018 04:16:37 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KPlU337L5FGw; Mon, 5 Mar 2018 04:16:37 -0500 (EST) Received: from turing.freelists.org (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5E66826402; Mon, 5 Mar 2018 04:16:37 -0500 (EST) Received: with ECARTIS (v1.0.0; list patchew-devel); Mon, 05 Mar 2018 04:16:37 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2ACC7270A3 for ; Mon, 5 Mar 2018 04:16:37 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cMwuYEw4xoBK for ; Mon, 5 Mar 2018 04:16:37 -0500 (EST) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id D316E26402 for ; Mon, 5 Mar 2018 04:16:36 -0500 (EST) Received: by mail-wm0-f65.google.com with SMTP id h21so14292126wmd.1 for ; Mon, 05 Mar 2018 01:16:36 -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 b68sm7018546wmi.30.2018.03.05.01.16.34 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Mar 2018 01:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org; s=turing; t=1520241397; bh=scZfPb47dNWuJSM/6SslEaJ9tCLnN29c54XFLt055KA=; h=From:To:Subject:Date:In-Reply-To:References:Reply-To:List-help: List-unsubscribe:List-Id:List-subscribe:List-owner:List-post: List-archive; b=YWCpGk6aGeGRnoNcHCj8KKNfjYTEeNYzm3uyCDfwDMHHxsjien4q4xEZW3HHsA5Xx sTwZ3LCeAy66oVhNrI9+IpOrz/noX3ga4a6lt2nQgr1vffPMmk0V+2PvySSjreSUew Mc6V/mPq8fR1AaR+rknaCFuyDeSPzJk0kZtRwRMI= X-Virus-Scanned: Debian amavisd-new at turing.freelists.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org; s=turing; t=1520241397; bh=scZfPb47dNWuJSM/6SslEaJ9tCLnN29c54XFLt055KA=; h=From:To:Subject:Date:In-Reply-To:References:Reply-To:List-help: List-unsubscribe:List-Id:List-subscribe:List-owner:List-post: List-archive; b=YWCpGk6aGeGRnoNcHCj8KKNfjYTEeNYzm3uyCDfwDMHHxsjien4q4xEZW3HHsA5Xx sTwZ3LCeAy66oVhNrI9+IpOrz/noX3ga4a6lt2nQgr1vffPMmk0V+2PvySSjreSUew Mc6V/mPq8fR1AaR+rknaCFuyDeSPzJk0kZtRwRMI= X-Original-To: patchew-devel@freelists.org X-Virus-Scanned: Debian amavisd-new at turing.freelists.org 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=jISDlnifq5xXQkWqQ+tHilFramT0NHYB0K3FVtMncl+eHfR0Wy1NxNUkn1OeW2/9oh BdHg62gFfb5gmFiUMwMpqhaRrhcjdvUCNuwHvp2ROfjQpIQMtqF3YBMhAOKqyKmfLIZD +4iVl5pujeJ6EVHPM+2F0pYL+NCwNPtKrSb3RarWQsdmjCUEDzcLJA1YH/WIUE8j/pTM 2cD7d1D9RtYJf89CDbllx9B0I+kPjeebH42Ypx4PHBsITXlNBH6i3pZrGmOJPuyyKLMV adVMmCZvo7HVzGsH4Z1k2MZU085kUuqvXRKLtoAFNUroXNUPLTZmragCZsNMCg4HxFRD 6EYw== X-Gm-Message-State: AElRT7F8oNEszusM2B3bs8Zd7I4iN7cvYbbcjUODkFj5MgtiVpU0ZsCG 81UY+q2JzuSFp1721wHB9cN3pgAZ X-Google-Smtp-Source: AG47ELv854jajZIaxmmdNzM7Z/I4oYUyjZPwSq9absig9EVN4PxueZLKM/vZNk4o7CRrMCG1OW64rA== X-Received: by 10.28.35.14 with SMTP id j14mr6877755wmj.43.1520241394983; Mon, 05 Mar 2018 01:16:34 -0800 (PST) From: Paolo Bonzini To: patchew-devel@freelists.org Subject: [patchew-devel] [PATCH 1/6] ansi2html: add _write_form_feed Date: Mon, 5 Mar 2018 10:16:29 +0100 Message-Id: <20180305091634.7391-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180305091634.7391-1-pbonzini@redhat.com> References: <20180305091634.7391-1-pbonzini@redhat.com> X-archive-position: 73 X-ecartis-version: Ecartis v1.0.0 Sender: patchew-devel-bounce@freelists.org Errors-to: patchew-devel-bounce@freelists.org X-original-sender: pbonzini@redhat.com Precedence: normal Reply-To: patchew-devel@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: patchew-devel X-List-ID: patchew-devel List-subscribe: List-owner: List-post: List-archive: X-list: patchew-devel X-ZohoMail-DKIM: pass (identity @freelists.org) X-ZohoMail: RDKM_0 RSF_4 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.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