xml2nroff: Allow comments in block XML.
authorBen Pfaff <blp@nicira.com>
Sun, 12 Jul 2015 18:59:17 +0000 (11:59 -0700)
committerBen Pfaff <blp@nicira.com>
Sun, 12 Jul 2015 22:38:48 +0000 (15:38 -0700)
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
python/build/nroff.py

index 68d2b46..6d22d46 100644 (file)
@@ -178,6 +178,8 @@ def block_xml_to_nroff(nodes, para='.PP'):
                 s += pre_to_nroff(node.childNodes, para, font)
             else:
                 s += inline_xml_to_nroff(node, r'\fR')
+        elif node.nodeType == node.COMMENT_NODE:
+            pass
         else:
             raise error.Error("unknown node %s in block xml" % node)
     if s != "" and not s.endswith('\n'):