summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2015-09-17 10:10:56 -0700
committerBen Pfaff <blp@nicira.com>2015-09-29 16:57:09 -0700
commit08258b507a5f8c0b3c415c0ae512e70139aff685 (patch)
treede91165864d8c39845de0abc433dd00f1b121a48 /python
parent41f17e52e079d9159fba9c78e9ef34f3f96a75b6 (diff)
downloadopenvswitch-08258b507a5f8c0b3c415c0ae512e70139aff685.tar.gz
nroff: Add support for <b>...</b> and <i>...</i> inline markup.
Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
Diffstat (limited to 'python')
-rw-r--r--python/build/nroff.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/build/nroff.py b/python/build/nroff.py
index 3eaffe78c..75461eb9a 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)