summaryrefslogtreecommitdiffstats
path: root/Doc/tools/texi2html.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1996-10-25 22:13:59 (GMT)
committerFred Drake <fdrake@acm.org>1996-10-25 22:13:59 (GMT)
commitabcb38250b3d743f48463b34757cd4f6dc77ce34 (patch)
treee761affbf3d258dbfcecb18985a94f2c5727d53d /Doc/tools/texi2html.py
parent893e5e0a15d79f9dd3cc737974371f4a0149c87a (diff)
downloadcpython-abcb38250b3d743f48463b34757cd4f6dc77ce34.zip
cpython-abcb38250b3d743f48463b34757cd4f6dc77ce34.tar.gz
cpython-abcb38250b3d743f48463b34757cd4f6dc77ce34.tar.bz2
(texi2html.py): Minor improvement to HTML 3.0 output for code examples.
Diffstat (limited to 'Doc/tools/texi2html.py')
-rw-r--r--Doc/tools/texi2html.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/tools/texi2html.py b/Doc/tools/texi2html.py
index d1c1a74..22aa1fb 100644
--- a/Doc/tools/texi2html.py
+++ b/Doc/tools/texi2html.py
@@ -1269,7 +1269,7 @@ class TexinfoParser:
self.nofill = self.nofill + 1
self.write('<PRE>')
def end_example(self):
- self.write('</PRE>')
+ self.write('</PRE>\n')
self.nofill = self.nofill - 1
bgn_lisp = bgn_example # Synonym when contents are executable lisp code
@@ -1434,8 +1434,13 @@ class TexinfoParserHTML3(TexinfoParser):
def end_quotation(self): self.write('</BQ>\n')
def bgn_example(self, args):
+ # this use of <CODE> would not be legal in HTML 2.0,
+ # but is in more recent DTDs.
self.nofill = self.nofill + 1
- self.write('<PRE CLASS=example>')
+ self.write('<PRE CLASS=example><CODE>')
+ def end_example(self):
+ self.write("</CODE></PRE>\n")
+ self.nofill = self.nofill - 1
def bgn_flushleft(self, args):
self.nofill = self.nofill + 1