Fix bug in formatting of new questions

This commit is contained in:
Guido van Rossum 1994-09-29 15:19:10 +00:00
parent e5f6f45a99
commit 457c0ab366
1 changed files with 3 additions and 1 deletions

View File

@ -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