From 66923a49827ff7d2c396a0a14e48115d4dc3a121 Mon Sep 17 00:00:00 2001 From: cmpilato Date: Thu, 16 Mar 2006 04:13:19 +0000 Subject: [PATCH] * lib/viewcvs.py (MarkupEnscript.__init__): Revert a change made in r1255 which tweaked the sed expression. The goal was to try to also strip out the
 and 
tags from the output, but the expression I used also had the undesired effect of dropping the whole last line of a non-newline-terminated file. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1283 8cb11bc2-c004-0410-86c3-e597b4017df7 --- lib/viewcvs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/viewcvs.py b/lib/viewcvs.py index 93730ca0..e289d407 100644 --- a/lib/viewcvs.py +++ b/lib/viewcvs.py @@ -1212,7 +1212,12 @@ class MarkupEnscript(MarkupShell): 'enscript')), '--color', '--language=html', '--pretty-print', '-o', '-', '-'] - sed_cmd = ['sed', '-n', '1,/^
$/d;/<\\/PRE>/,$d;p']
+
+    ### I'd like to also strip the 
 and 
tags, too, but + ### can't come up with a suitable sed expression. Using + ### '1,/^
$/d;/<\\/PRE>/,$d;p' gets me most of the way, but
+    ### will drop the last line of a non-newline-terminated filed.
+    sed_cmd = ['sed', '-n', '/^
$/,/<\\/PRE>$/p']
 
     MarkupShell.__init__(self, fp, [enscript_cmd, sed_cmd])
     self.filename = filename