serg472 / htmlcompressor

HTML Compressor and Minifier, can be used standalone and as a Java library
Apache License 2.0
40 stars 14 forks source link

v0.9.3 fails to compress CSS and JS within HTML file #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. use htmlcompressor v0.9.6
2. compress file containing HTML/inline CSS/inline Javascript, using options 
follows:
  --type html --charset utf-8 --remove-quotes --remove-intertag-spaces \
--compress-js --compress-css --line-break 254
2. compress same file with v0.9.3
3. Compare output

What is the expected output? What do you see instead?

EXPECTED to see new version compress as well or better than old, compressing 
HTML, CSS and JS.

INSTEAD, new version fails to compress CSS and fails to compress Javascript. 
Only HTML is compressed.

What version of the product are you using? On what operating system?

htmlcompressor-0.9.6.jar, yuicompressor-2.4.2.jar
OS: Mac OS 10.6.5
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

Please provide any additional information below.

Sample command line session
NOTE: v0.9.6 does NOT compress file that v0.9.3 does, w/same options

$ls -Fsal
total 1880
   0 drwxr-xr-x   7 tkuser  staff     238 Dec 12 20:32 ./
   0 drwxrwxr-t  37 root   admin    1326 Dec 12 20:31 ../
  16 -rw-r--r--@  1 tkuser  staff    6148 Dec 12 20:30 .DS_Store
  80 -rw-------@  1 tkuser  staff   37620 Oct 30 19:44 htmlcompressor-0.9.3.jar
  80 -rw-r--r--@  1 tkuser  staff   39485 Dec 12 17:54 htmlcompressor-0.9.6.jar
  40 -rw-r--r--   1 tkuser  staff   19472 Dec 12 20:10 tel.html
1664 -rw-r--r--@  1 tkuser  staff  851219 Nov 14  2008 yuicompressor-2.4.2.jar
$java -jar htmlcompressor-0.9.3.jar --type html --charset utf-8 --remove-quotes 
--remove-intertag-spaces --compress-js --compress-css --line-break 254 tel.html 
-o tel-compressed-093.html
$java -jar htmlcompressor-0.9.6.jar --type html --charset utf-8 --remove-quotes 
--remove-intertag-spaces --compress-js --compress-css --line-break 254 tel.html 
-o tel-compressed-096.html
$ls -Fsal
total 1960
   0 drwxr-xr-x   9 tkuser  staff     306 Dec 12 20:34 ./
   0 drwxrwxr-t  37 root   admin    1326 Dec 12 20:31 ../
  16 -rw-r--r--@  1 tkuser  staff    6148 Dec 12 20:30 .DS_Store
  80 -rw-------@  1 tkuser  staff   37620 Oct 30 19:44 htmlcompressor-0.9.3.jar
  80 -rw-r--r--@  1 tkuser  staff   39485 Dec 12 17:54 htmlcompressor-0.9.6.jar
  40 -rw-r--r--   1 tkuser  staff   16462 Dec 12 20:33 tel-compressed-093.html
  40 -rw-r--r--   1 tkuser  staff   19319 Dec 12 20:34 tel-compressed-096.html
  40 -rw-r--r--   1 tkuser  staff   19472 Dec 12 20:10 tel.html
1664 -rw-r--r--@  1 tkuser  staff  851219 Nov 14  2008 yuicompressor-2.4.2.jar

Original issue reported on code.google.com by tom.king...@gmail.com on 13 Dec 2010 at 4:54

GoogleCodeExporter commented 9 years ago
Correction, it is ** v0.9.6 ** that does NOT compress

Original comment by tom.king...@gmail.com on 13 Dec 2010 at 5:02

GoogleCodeExporter commented 9 years ago
Fixed in 0.9.7

Thanks.

Original comment by serg472@gmail.com on 13 Dec 2010 at 6:46