From patchwork Fri Nov 9 05:39:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 995316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42rpsM1grgz9s9J for ; Fri, 9 Nov 2018 16:40:39 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 94C2AB94; Fri, 9 Nov 2018 05:40:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id F1512B88 for ; Fri, 9 Nov 2018 05:40:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6A45075B for ; Fri, 9 Nov 2018 05:40:04 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigabrt.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 0F927C0007; Fri, 9 Nov 2018 05:40:01 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 8 Nov 2018 21:39:54 -0800 Message-Id: <20181109053955.28951-2-blp@ovn.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20181109053955.28951-1-blp@ovn.org> References: <20181109053955.28951-1-blp@ovn.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH 2/3] nroff: Fix fonts for h2, h3, h4. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Without this change, the fonts are wrong if a title contains formatting like or . Signed-off-by: Ben Pfaff --- python/build/nroff.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/build/nroff.py b/python/build/nroff.py index 17ff69bfe47a..78e4eae6aee4 100644 --- a/python/build/nroff.py +++ b/python/build/nroff.py @@ -366,14 +366,14 @@ def block_xml_to_nroff(nodes, para='.PP'): if s != "": if not s.endswith("\n"): s += "\n" - nroffTag = {'h1': 'SH', - 'h2': 'SS', - 'h3': 'ST', - 'h4': 'SU'}[node.tagName] + nroffTag, font = {'h1': ('SH', r'\fR'), + 'h2': ('SS', r'\fB'), + 'h3': ('ST', r'\fI'), + 'h4': ('SU', r'\fI')}[node.tagName] to_upper = node.tagName == 'h1' s += ".%s \"" % nroffTag for child_node in node.childNodes: - s += inline_xml_to_nroff(child_node, r'\fR', to_upper) + s += inline_xml_to_nroff(child_node, font, to_upper) s += "\"\n" elif node.tagName == 'pre': fixed = node.getAttribute('fixed')