summaryrefslogtreecommitdiff
path: root/python/build
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-12-14 11:17:23 -0800
committerBen Pfaff <blp@ovn.org>2017-12-14 11:21:42 -0800
commit12b84d50e0324727a24fc5aa378497e1dbe41821 (patch)
tree6bbc52f2da260a5049b684cb225b70d7b18663c7 /python/build
parentadb4185d01ce964db1154df07dbd91c0f90539f7 (diff)
downloadopenvswitch-12b84d50e0324727a24fc5aa378497e1dbe41821.tar.gz
ovsdb: Improve documentation.
Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'python/build')
-rw-r--r--python/build/nroff.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/python/build/nroff.py b/python/build/nroff.py
index 401f6992a..73353061c 100644
--- a/python/build/nroff.py
+++ b/python/build/nroff.py
@@ -80,23 +80,24 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
s += inline_xml_to_nroff(child, r'\fB', to_upper, newline)
return s + font
elif node.tagName == 'ref':
- s = r'\fB'
if node.hasAttribute('column'):
- s += node.attributes['column'].nodeValue
+ s = node.attributes['column'].nodeValue
if node.hasAttribute('key'):
s += ':' + node.attributes['key'].nodeValue
elif node.hasAttribute('table'):
- s += node.attributes['table'].nodeValue
+ s = node.attributes['table'].nodeValue
elif node.hasAttribute('group'):
- s += node.attributes['group'].nodeValue
+ s = node.attributes['group'].nodeValue
elif node.hasAttribute('db'):
- s += node.attributes['db'].nodeValue
+ s = node.attributes['db'].nodeValue
elif node.hasAttribute('field'):
- s += node.attributes['field'].nodeValue
+ s = node.attributes['field'].nodeValue
+ elif node.hasAttribute('section'):
+ s = node.attributes['section'].nodeValue
else:
raise error.Error("'ref' lacks required attributes: %s"
% list(node.attributes.keys()))
- return s + font
+ return r'\fB' + re.sub(r'\s+', ' ', s) + font
elif node.tagName in ['var', 'dfn', 'i', 'cite']:
s = r'\fI'
for child in node.childNodes: