gruffus / vqmod

Automatically exported from code.google.com/p/vqmod
0 stars 0 forks source link

Remove the offset lines instead of creating blank lines #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
<file name="catalog/view/theme/default/template/common/header.tpl">
        <operation error="skip">
            <search position="replace" offset="10"><![CDATA[</head><body>]]></search>
            <add><![CDATA[]]></add>
        </operation>
    </file>

What is the expected output? What do you see instead?
It should remove lines but creates blank lines.

vQmod Version: 2.1.5
Server Operating System: Linux

The line 226 should be like this:
unset($tmp[$lineNum + $i]);

http://code.google.com/p/vqmod/source/browse/trunk/vqmod/vqmod.php#226

Original issue reported on code.google.com by ayels...@gmail.com on 31 Dec 2011 at 11:54

GoogleCodeExporter commented 8 years ago
This isn't a bug and has been discussed before. The empty lines cause no issues 
and no performance is lost as a result of them. This may be changed in the 
future but for now is not an issue other than aesthetics

Original comment by DJG6...@gmail.com on 2 Jan 2012 at 1:49

GoogleCodeExporter commented 8 years ago
Not causing any issue for now does not mean it "should" be there. Why creating 
empty lines instead of remove them? Is there any advantage of empty lines?

Original comment by ayels...@gmail.com on 2 Jan 2012 at 2:26

GoogleCodeExporter commented 8 years ago
Its not an advantage as such no, but the current vqmod works on a line by line 
basis, and does offsetting using exact numbers of the lines, therefore removing 
the lines would cause issues for offsets. It could be worked around in theory, 
but requires quite a bit of work and isn't exactly a high priority at the 
minute. Your suggestion of the unset is not a viable solution

Original comment by DJG6...@gmail.com on 2 Jan 2012 at 2:31