cssshrink icon indicating copy to clipboard operation
cssshrink copied to clipboard

Wrong line number at error info

Open rhapsodyn opened this issue 10 years ago • 0 comments

When gonzales-ast throw some errors, the error info seems not right.

files.forEach(function(file, index) {
 fs.readFile(file, READ_OPTION, function(err, data) {
   if (err) {
    throw err;
   };

   if (data.trim().length > 0) {
    var compressed = cssshrink.shrink(data);
....

As code above, when there's some parsing error at index > 0, the line-number will be "right_line_number + sum_of_prev_file_line_numbers".

This issue appear at http://cssshrink.com/ too, you need to F5 to get the right line number.

rhapsodyn avatar Jul 02 '14 09:07 rhapsodyn