[Python-checkins] CVS: python/nondist/peps pep2html.py,1.24,1.25
Barry Warsaw
bwarsaw@users.sourceforge.net
Tue, 05 Jun 2001 10:21:21 -0700
Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv24183
Modified Files:
pep2html.py
Log Message:
fixanchor(): Use a module global RFCURL template for RFC urls. Change
this template to point at the nice faqs.org html-ified RFCs.
Index: pep2html.py
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** pep2html.py 2001/05/01 17:53:52 1.24
--- pep2html.py 2001/06/05 17:21:19 1.25
***************
*** 35,38 ****
--- 35,39 ----
PROGRAM = sys.argv[0]
+ RFCURL = 'http://www.faqs.org/rfcs/rfc%d.html'
***************
*** 72,76 ****
elif text[:3] == 'RFC':
rfcnum = int(match.group('rfcnum'), 10)
! link = 'http://www.rfc-editor.org/rfc/rfc%04d.txt' % rfcnum
if link:
return "<a href='%s'>%s</a>" % (link, cgi.escape(text))
--- 73,77 ----
elif text[:3] == 'RFC':
rfcnum = int(match.group('rfcnum'), 10)
! link = RFCURL % rfcnum
if link:
return "<a href='%s'>%s</a>" % (link, cgi.escape(text))