Skip to content

Commit 7575d9d

Browse files
committed
Merge pull request #41 from tedious/empty_comments
Fix /**/ bug and add test cases.
2 parents 4c2c2ca + 785733f commit 7575d9d

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/JShrink/Minifier.php

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ protected function initialize($js, $options)
155155
{
156156
$this->options = array_merge(static::$defaultOptions, $options);
157157
$js = str_replace("\r\n", "\n", $js);
158+
$js = str_replace('/**/', '', $js);
158159
$this->input = str_replace("\r", "\n", $js);
159160

160161
// We add a newline to the end of the script to make it easier to deal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/**/
2+
var test;
3+
/**/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var test;

0 commit comments

Comments
 (0)