summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-09-29 19:07:22 (GMT)
committerFred Drake <fdrake@acm.org>2001-09-29 19:07:22 (GMT)
commitac1af8093ef39028c993c5b343c557d94528fd25 (patch)
treebd42661da226334554914e14b33dc8e2c962b95b
parent0d68246f01304a3318f8753b88a32585db614406 (diff)
downloadcpython-ac1af8093ef39028c993c5b343c557d94528fd25.zip
cpython-ac1af8093ef39028c993c5b343c557d94528fd25.tar.gz
cpython-ac1af8093ef39028c993c5b343c557d94528fd25.tar.bz2
Handle PEP references the same way RFC references.
-rwxr-xr-xDoc/tools/sgmlconv/docfixer.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Doc/tools/sgmlconv/docfixer.py b/Doc/tools/sgmlconv/docfixer.py
index f2ad181..8436784 100755
--- a/Doc/tools/sgmlconv/docfixer.py
+++ b/Doc/tools/sgmlconv/docfixer.py
@@ -759,9 +759,9 @@ def skip_leading_nodes(children, start=0):
def fixup_rfc_references(doc, fragment):
- for rfcnode in find_all_elements(fragment, "rfc"):
+ for rfcnode in find_all_elements_from_set(fragment, ("pep", "rfc")):
rfcnode.appendChild(doc.createTextNode(
- "RFC " + rfcnode.getAttribute("num")))
+ rfcnode.tagName.upper() + " " + rfcnode.getAttribute("num")))
def fixup_signatures(doc, fragment):
@@ -1026,10 +1026,9 @@ def convert(ifp, ofp):
d = {}
for gi in events.parser.get_empties():
d[gi] = gi
- if d.has_key("author"):
- del d["author"]
- if d.has_key("rfc"):
- del d["rfc"]
+ for key in ("author", "pep", "rfc"):
+ if d.has_key(key):
+ del d[key]
knownempty = d.has_key
#
try: