summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-31 04:20:26 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-31 04:20:26 (GMT)
commit59ed448bc64219e7db140b5c9e3c819703184a10 (patch)
tree5d1692f665ee4c5c7548496628c631c2e22c035b
parenta6ca4f40d01acfbf09751710149f49bb1053542b (diff)
downloadcpython-59ed448bc64219e7db140b5c9e3c819703184a10.zip
cpython-59ed448bc64219e7db140b5c9e3c819703184a10.tar.gz
cpython-59ed448bc64219e7db140b5c9e3c819703184a10.tar.bz2
SF patch #474485: pydoc generates some bad html, from Rich Salz.
-rwxr-xr-xLib/pydoc.py10
-rw-r--r--Misc/ACKS1
2 files changed, 6 insertions, 5 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 911291b..ab11d00 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -331,7 +331,7 @@ class HTMLDoc(Doc):
def page(self, title, contents):
"""Format an HTML page."""
return '''
-<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: %s</title>
<style type="text/css"><!--
TT { font-family: lucidatypewriter, lucida console, courier }
@@ -342,7 +342,7 @@ TT { font-family: lucidatypewriter, lucida console, courier }
def heading(self, title, fgcol, bgcol, extras=''):
"""Format a page heading."""
return '''
-<table width="100%%" cellspacing=0 cellpadding=2 border=0>
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="%s">
<td valign=bottom>&nbsp;<br>
<font color="%s" face="helvetica, arial">&nbsp;<br>%s</font></td
@@ -356,7 +356,7 @@ TT { font-family: lucidatypewriter, lucida console, courier }
if marginalia is None:
marginalia = '<tt>' + '&nbsp;' * width + '</tt>'
result = '''
-<p><table width="100%%" cellspacing=0 cellpadding=2 border=0>
+<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="%s">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="%s" face="helvetica, arial">%s</font></td></tr>
@@ -393,7 +393,7 @@ TT { font-family: lucidatypewriter, lucida console, courier }
if i < len(list):
result = result + format(list[i]) + '<br>\n'
result = result + '</td>'
- return '<table width="100%%"><tr>%s</tr></table>' % result
+ return '<table width="100%%" summary="list"><tr>%s</tr></table>' % result
def grey(self, text): return '<font color="#909090">%s</font>' % text
@@ -785,7 +785,7 @@ TT { font-family: lucidatypewriter, lucida console, courier }
argspec = inspect.formatargspec(
args, varargs, varkw, defaults, formatvalue=self.formatvalue)
if realname == '<lambda>':
- decl = '<em>lambda</em>'
+ title = '<strong>%s</strong> <em>lambda</em> ' % name
argspec = argspec[1:-1] # remove parentheses
else:
argspec = '(...)'
diff --git a/Misc/ACKS b/Misc/ACKS
index 9c032a7..b8e0b63 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -408,6 +408,7 @@ Kalle Svensson
Hajime Saitou
RajGopal Srinivasan
Jim St. Pierre
+Rich Salz
Quentin Stafford-Fraser
Frank Stajano
Richard Stoakley