[Python-checkins] CVS: python/dist/src/Doc/tools/sgmlconv docfixer.py,1.33,1.34

Fred L. Drake fdrake@users.sourceforge.net
Sat, 29 Sep 2001 12:07:24 -0700


Update of /cvsroot/python/python/dist/src/Doc/tools/sgmlconv
In directory usw-pr-cvs1:/tmp/cvs-serv25741/tools/sgmlconv

Modified Files:
	docfixer.py 
Log Message:
Handle PEP references the same way RFC references.

Index: docfixer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/docfixer.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** docfixer.py	2001/09/29 05:05:25	1.33
--- docfixer.py	2001/09/29 19:07:22	1.34
***************
*** 760,766 ****
  
  def fixup_rfc_references(doc, fragment):
!     for rfcnode in find_all_elements(fragment, "rfc"):
          rfcnode.appendChild(doc.createTextNode(
!             "RFC " + rfcnode.getAttribute("num")))
  
  
--- 760,766 ----
  
  def fixup_rfc_references(doc, fragment):
!     for rfcnode in find_all_elements_from_set(fragment, ("pep", "rfc")):
          rfcnode.appendChild(doc.createTextNode(
!             rfcnode.tagName.upper() + " " + rfcnode.getAttribute("num")))
  
  
***************
*** 1027,1034 ****
      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"]
      knownempty = d.has_key
      #
--- 1027,1033 ----
      for gi in events.parser.get_empties():
          d[gi] = gi
!     for key in ("author", "pep", "rfc"):
!         if d.has_key(key):
!             del d[key]
      knownempty = d.has_key
      #