Author: cmpilato
Date: Wed Mar 15 20:13:19 2006
New Revision: 1283
Modified:
trunk/lib/viewcvs.py
Log:
* 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 <PRE> and </PRE> 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.
Modified: trunk/lib/viewcvs.py
Url:
http://viewvc.tigris.org/source/browse/viewvc/trunk/lib/viewcvs.py?view=diff&rev=1283&p1=trunk/lib/viewcvs.py&r1=1282&p2=trunk/lib/viewcvs.py&r2=1283
==============================================================================
--- trunk/lib/viewcvs.py (original)
+++ trunk/lib/viewcvs.py Wed Mar 15 20:13:19 2006
@@ -1212,7 +1212,12 @@
'enscript')),
'--color', '--language=html', '--pretty-print',
'-o', '-', '-']
- sed_cmd = ['sed', '-n', '1,/^<PRE>$/d;/<\\/PRE>/,$d;p']
+
+ ### I'd like to also strip the <PRE> and </PRE> tags, too, but
+ ### can't come up with a suitable sed expression. Using
+ ### '1,/^<PRE>$/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>$/,/<\\/PRE>$/p']
MarkupShell.__init__(self, fp, [enscript_cmd, sed_cmd])
self.filename = filename
|