From patchwork Thu Sep 17 17:11:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 518972 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 76F171400B7 for ; Fri, 18 Sep 2015 03:11:38 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id C2B2F106E5; Thu, 17 Sep 2015 10:11:37 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 69A90106E4 for ; Thu, 17 Sep 2015 10:11:36 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id A9721420067 for ; Thu, 17 Sep 2015 11:11:35 -0600 (MDT) X-ASG-Debug-ID: 1442509894-09eadd48fa2dbd30001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id NVFCRNLi2X12B6nx (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 17 Sep 2015 11:11:34 -0600 (MDT) X-Barracuda-Envelope-From: blp@nicira.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mail-pa0-f45.google.com) (209.85.220.45) by mx1-pf2.cudamail.com with ESMTPS (RC4-SHA encrypted); 17 Sep 2015 17:11:34 -0000 Received-SPF: unknown (mx1-pf2.cudamail.com: Multiple SPF records returned) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.45 Received: by padhy16 with SMTP id hy16so24848562pad.1 for ; Thu, 17 Sep 2015 10:11:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZVC0djOL7lhmtanszjSr4aonZ+YcwV+yQrKvvJlPxaQ=; b=QNG5Nv1cwqyOGyjvzziYvR73QXqdbOzvx1LlrXhw2Bxf1hzp6Y/W4Fg/gzUAjv3uzo THCxXmmrjWJctVGNnrKLG/lUSSvzaXsaLxKoe/2oMxbfT/npDqlY+kuv1j4WaTHwQjPp VMuUhusMmi6ZQ5GvnvIRb7VwODaQozLxs7lTwQKSe2SaHAnMqD/3vRrxImz/h3HU9zm5 JmWWRA52qezNZ7uINpXGhmT/VVt63lzxS89X4dVzowK5tsykRxNWDxp82ZbyI2GVRXG6 yFuZBgsXzSU+qQoLtvIW+MIuAqjmpurNFGwD72oscf50LJPIHv3S09pztL8q0ia3oc/w 5JGg== X-Gm-Message-State: ALoCoQkJHk3H3jbGcdwHflnTClFbZ660i4L9qJwJ3LW5NOxmCbUi6ISz0asJt5RZX7itozmwyDF3 X-Received: by 10.66.142.233 with SMTP id rz9mr364619pab.23.1442509893992; Thu, 17 Sep 2015 10:11:33 -0700 (PDT) Received: from sigabrt.benpfaff.org ([208.91.2.4]) by smtp.gmail.com with ESMTPSA id be3sm4440806pbc.88.2015.09.17.10.11.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Sep 2015 10:11:32 -0700 (PDT) X-CudaMail-Envelope-Sender: blp@nicira.com X-Barracuda-Apparent-Source-IP: 208.91.2.4 From: Ben Pfaff To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-916058151 X-CudaMail-DTE: 091715 X-CudaMail-Originating-IP: 209.85.220.45 Date: Thu, 17 Sep 2015 10:11:22 -0700 X-ASG-Orig-Subj: [##CM-E2-916058151##][PATCH 2/3] nroff: Add support for ... and ... inline markup. Message-Id: <1442509883-3992-2-git-send-email-blp@nicira.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1442509883-3992-1-git-send-email-blp@nicira.com> References: <1442509883-3992-1-git-send-email-blp@nicira.com> X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1442509894 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH 2/3] nroff: Add support for ... and ... inline markup. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --- python/build/nroff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/nroff.py b/python/build/nroff.py index 04fc3e8..8b16db5 100644 --- a/python/build/nroff.py +++ b/python/build/nroff.py @@ -66,7 +66,7 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'): s = text_to_nroff(node.data, font) return s.replace('\n', newline) elif node.nodeType == node.ELEMENT_NODE: - if node.tagName in ['code', 'em', 'option', 'env']: + if node.tagName in ['code', 'em', 'option', 'env', 'b']: s = r'\fB' for child in node.childNodes: s += inline_xml_to_nroff(child, r'\fB', to_upper, newline) @@ -86,7 +86,7 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'): else: raise error.Error("'ref' lacks required attributes: %s" % node.attributes.keys()) return s + font - elif node.tagName == 'var' or node.tagName == 'dfn': + elif node.tagName in ['var', 'dfn', 'i']: s = r'\fI' for child in node.childNodes: s += inline_xml_to_nroff(child, r'\fI', to_upper, newline)