From: Guido van Rossum Date: Thu, 29 Sep 1994 15:19:10 +0000 (+0000) Subject: Fix bug in formatting of new questions X-Git-Tag: v1.1~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=457c0ab366e439abc36089e7440b36ac0517cedd;p=thirdparty%2FPython%2Fcpython.git Fix bug in formatting of new questions --- diff --git a/Misc/renumber.py b/Misc/renumber.py index a62257cbc013..f2299b66f26a 100755 --- a/Misc/renumber.py +++ b/Misc/renumber.py @@ -43,10 +43,12 @@ def main(): if n < 0: n = newquestionprog.match(line) - 3 if n >= 0: question = question + 1 - line = '%d.%d. '%(chapter, question) + line[n:] + number = '%d.%d. '%(chapter, question) + line = number + line[n:] lines[i] = line questions.append(' ' + line) # Add up to 4 continuations of the question + n = len(number) for j in range(i+1, i+5): if blankprog.match(lines[j]) >= 0: break