Remove incorrect sourceMap link in concatenated JS output

This commit is contained in:
Kijin Sung 2023-09-04 22:00:12 +09:00
parent 99c905a6f4
commit 74cc098370
4 changed files with 6 additions and 2 deletions

View file

@ -516,6 +516,7 @@ class Formatter
// Clean the content.
$content = utf8_clean(file_get_contents($filename));
$content = preg_replace('!(\n)//# (sourceMappingURL=\S+)!', '$1/* $2 */', $content);
// Append to the result string.
$original_filename = starts_with(\RX_BASEDIR, $filename) ? substr($filename, strlen(\RX_BASEDIR)) : $filename;

View file

@ -4,3 +4,4 @@
$(this).attr("bar", "baz");
});
})(jQuery);
//# sourceMappingURL=concat.source1.js.map

View file

@ -5,7 +5,8 @@
event.preventDefault();
$(this).attr("bar", "baz");
});
})(jQuery);;
})(jQuery);
/* sourceMappingURL=concat.source1.js.map */;
/* Original file: tests/_data/formatter/concat.source2.js */

View file

@ -5,7 +5,8 @@
event.preventDefault();
$(this).attr("bar", "baz");
});
})(jQuery);;
})(jQuery);
/* sourceMappingURL=concat.source1.js.map */;
/* Original file: tests/_data/formatter/concat.source2.js */