[Python-checkins] peps: special case lines beginning with "[*]" as non-header
georg.brandl
python-checkins at python.org
Wed Mar 23 21:24:32 CET 2011
http://hg.python.org/peps/rev/9c21f4ecc146
changeset: 85:9c21f4ecc146
user: Peter Schneider-Kamp <nowonder at nowonder.de>
date: Fri Aug 11 22:18:04 2000 +0000
summary:
special case lines beginning with "[*]" as non-header
add optical sugar
files:
pep2html.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/pep2html.py b/pep2html.py
--- a/pep2html.py
+++ b/pep2html.py
@@ -91,7 +91,7 @@
if not line:
break
if line[0] != "\f":
- if line[0].strip():
+ if line[0].strip() and line[:3] != '[*]':
if line.strip() == LOCALVARS:
break
fo.write("</pre>\n<h3>%s</h3>\n<pre>" % line.strip())
@@ -109,8 +109,9 @@
def main():
update = 1
for file in glob.glob("pep-*.txt"):
- print file, "..."
- fixfile(file, os.path.splitext(file)[0] + ".html")
+ newfile = os.path.splitext(file)[0] + ".html"
+ print file, "->", newfile
+ fixfile(file, newfile)
if len(sys.argv) > 1 and sys.argv[1] == "-n":
update = 0
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list