From e0189b5a17904d1b106f2a1149457026bd2a887d Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 7 Oct 2014 12:12:47 -0400 Subject: [PATCH] cleanup version header, too --- pep2html.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pep2html.py b/pep2html.py index 224bfe6a7..ee5e6fb18 100755 --- a/pep2html.py +++ b/pep2html.py @@ -242,6 +242,9 @@ def fixfile(inpath, input_lines, outfile): url = PEPURL % 9 pep_type = v or 'text/plain' v = '%s ' % (url, cgi.escape(pep_type)) + elif k.lower() == 'version': + if v.startswith('$' 'Revision: ') and v.endswith(' $'): + v = cgi.escape(v[11:-2]) else: v = cgi.escape(v) print >> outfile, ' %s: %s' \