]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Adjust input pre-processing so that a comment on the last line does not
authorFred Drake <fdrake@acm.org>
Mon, 19 Nov 2001 05:27:40 +0000 (05:27 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 19 Nov 2001 05:27:40 +0000 (05:27 +0000)
break the processor; this will do the right thing.

Doc/tools/sgmlconv/latex2esis.py

index 32115a8b504815f11c07837f64821a53c0715cce..28433c740c4ac5ee7d1038f3b400cd4a99296aec 100755 (executable)
@@ -109,7 +109,9 @@ class Conversion:
         self.write = ofp.write
         self.ofp = ofp
         self.table = table
-        self.line = string.join([s.rstrip() for s in ifp.readlines()], "\n")
+        L = [s.rstrip() for s in ifp.readlines()]
+        L.append("")
+        self.line = string.join(L, "\n")
         self.preamble = 1
 
     def convert(self):