From: Fred Drake Date: Thu, 26 Aug 1999 17:50:26 +0000 (+0000) Subject: convert(): Add support for ESIS '&' lines, and make sure we don't X-Git-Tag: v1.6a1~975 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53eae8e81bfc72754f9be607203c558e0cedee90;p=thirdparty%2FPython%2Fcpython.git convert(): Add support for ESIS '&' lines, and make sure we don't silently ignore unrecognized lines. --- diff --git a/Doc/tools/sgmlconv/esis2sgml.py b/Doc/tools/sgmlconv/esis2sgml.py index 38866cec217a..adb887312a07 100755 --- a/Doc/tools/sgmlconv/esis2sgml.py +++ b/Doc/tools/sgmlconv/esis2sgml.py @@ -146,6 +146,11 @@ def convert(ifp, ofp, xml=0, autoclose=(), verbatims=()): attrs[name] = esistools.decode(value) elif type == "e": knownempty = 1 + elif type == "&": + ofp.write("&%s;" % data) + knownempty = 0 + else: + raise RuntimeError, "unrecognized ESIS event type: '%s'" % type if LIST_EMPTIES: dump_empty_element_names(knownempties)