2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

xml2nroff: Fix formatting of action headers in ovs-actions(7) manpage.

The action headings were coming out all smashed together, like
"Theoutputaction".  This fixes them so that they appear correctly, like
"The output action".

The previous code stripped starting and ending spaces on a per-node
basis, so that "The ", "<code>output</code>", and " action" each got
stripped down to "The", "output", "action" after processing.  This
commit changes it so that stripping happens after concatenation, fixing
the problem.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-By: Timothy Redaelli <tredaelli@redhat.com>
Tested-By: Timothy Redaelli <tredaelli@redhat.com>
This commit is contained in:
Ben Pfaff
2021-04-14 13:40:13 -07:00
parent a019868a62
commit 09fe18af2d

View File

@@ -377,10 +377,9 @@ def block_xml_to_nroff(nodes, para='.PP'):
'h4': ('SU', r'\fI')}[node.tagName]
to_upper = node.tagName == 'h1'
s += ".%s \"" % nroffTag
for child_node in node.childNodes:
s += flatten_header(
inline_xml_to_nroff(child_node, font, to_upper)
)
s += flatten_header(''.join([
inline_xml_to_nroff(child_node, font, to_upper)
for child_node in node.childNodes]))
s += "\"\n"
elif node.tagName == 'pre':
fixed = node.getAttribute('fixed')