rst2man: more robust uppercasing of section titles
This handles section titles with child elements such as emphasis or
inline literals.
--- a/doc/rst2man.py Sun Nov 08 11:46:38 2009 +0100
+++ b/doc/rst2man.py Sun Nov 08 16:16:21 2009 +0100
@@ -1048,7 +1048,8 @@
raise nodes.SkipNode
elif self.section_level == 1:
self.body.append('.SH ')
- node[:] = nodes.Text(node.astext().upper())
+ for n in node.traverse(nodes.Text):
+ n.parent.replace(n, nodes.Text(n.astext().upper()))
else:
self.body.append('.SS ')