summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-01-29 21:35:50 (GMT)
committerFred Drake <fdrake@acm.org>1999-01-29 21:35:50 (GMT)
commit279ca75a5be39678d38bff6e2497b1f185658c0a (patch)
treeb3b0a5342fe3a556f80230769c8edcb160e50e6d
parent3a7ff998aca0301659bb906d3631a4e02326615d (diff)
downloadcpython-279ca75a5be39678d38bff6e2497b1f185658c0a.zip
cpython-279ca75a5be39678d38bff6e2497b1f185658c0a.tar.gz
cpython-279ca75a5be39678d38bff6e2497b1f185658c0a.tar.bz2
Be a little smarter on some attribute values, making an assumption about
the DTD.
-rwxr-xr-xDoc/tools/sgmlconv/esis2sgml.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/tools/sgmlconv/esis2sgml.py b/Doc/tools/sgmlconv/esis2sgml.py
index c43ddbc..762e5ff 100755
--- a/Doc/tools/sgmlconv/esis2sgml.py
+++ b/Doc/tools/sgmlconv/esis2sgml.py
@@ -32,7 +32,10 @@ def format_attrs(attrs, xml=0):
if name == value and isnmtoken(value):
s = "%s %s" % (s, value)
elif istoken(value):
- s = "%s %s=%s" % (s, name, value)
+ if value == "no" + name:
+ s = "%s %s" % (s, value)
+ else:
+ s = "%s %s=%s" % (s, name, value)
else:
s = '%s %s="%s"' % (s, name, escape(value))
return s