Version 0.5.1
authorkangax <kangax@gmail.com>
Sun, 12 May 2013 17:17:50 +0000 (13:17 -0400)
committerkangax <kangax@gmail.com>
Sun, 12 May 2013 17:17:50 +0000 (13:17 -0400)
dist/all.js
package.json
src/htmlminifier.js
tests/minifier.js

index a463710..311287f 100644 (file)
   }
 })(typeof exports === 'undefined' ? this : exports);
 /*!
- * HTMLMinifier v0.5.0
+ * HTMLMinifier v0.5.1
  * http://kangax.github.com/html-minifier/
  *
  * Copyright (c) 2010-2013 Juriy "kangax" Zaytsev
   function collapseWhitespace(str) {
     return str.replace(/\s+/g, ' ');
   }
-  
+
   function collapseWhitespaceSmart(str, prevTag, nextTag) {
     // array of tags that will maintain a single space outside of them
     var tags = ['a', 'b', 'big', 'button', 'em', 'font','i',  'img', 'mark', 's', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tt', 'u'];
-    
+
     if (prevTag && (prevTag.substr(0,1) !== '/'
       || ( prevTag.substr(0,1) === '/' && tags.indexOf(prevTag.substr(1)) === -1))) {
       str = str.replace(/^\s+/, '');
     }
-    
+
     if (nextTag && (nextTag.substr(0,1) === '/'
       || ( nextTag.substr(0,1) !== '/' && tags.indexOf(nextTag) === -1))) {
       str = str.replace(/\s+$/, '');
-    } 
-    
+    }
+
     if (prevTag && nextTag) {
       // strip non space whitespace then compress spaces to one
       return str.replace(/[\t\n\r]+/g, '').replace(/[ ]+/g, ' ');
     }
-    
+
     return str;
   }
 
index a7acf2e..bef4b49 100644 (file)
@@ -1,7 +1,7 @@
 {
   "name": "html-minifier",
   "description": "HTML minifier with lint-like capabilities.",
-  "version": "0.5.0",
+  "version": "0.5.1",
   "keywords": ["html", "minifier", "lint"],
   "url" : "http://github.com/kangax/html-minifier",
   "maintainers": [{
index ff4fe7d..d86268e 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * HTMLMinifier v0.5.0
+ * HTMLMinifier v0.5.1
  * http://kangax.github.com/html-minifier/
  *
  * Copyright (c) 2010-2013 Juriy "kangax" Zaytsev
   function collapseWhitespace(str) {
     return str.replace(/\s+/g, ' ');
   }
-  
+
   function collapseWhitespaceSmart(str, prevTag, nextTag) {
     // array of tags that will maintain a single space outside of them
     var tags = ['a', 'b', 'big', 'button', 'em', 'font','i',  'img', 'mark', 's', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tt', 'u'];
-    
+
     if (prevTag && (prevTag.substr(0,1) !== '/'
       || ( prevTag.substr(0,1) === '/' && tags.indexOf(prevTag.substr(1)) === -1))) {
       str = str.replace(/^\s+/, '');
     }
-    
+
     if (nextTag && (nextTag.substr(0,1) === '/'
       || ( nextTag.substr(0,1) !== '/' && tags.indexOf(nextTag) === -1))) {
       str = str.replace(/\s+$/, '');
-    } 
-    
+    }
+
     if (prevTag && nextTag) {
       // strip non space whitespace then compress spaces to one
       return str.replace(/[\t\n\r]+/g, '').replace(/[ ]+/g, ' ');
     }
-    
+
     return str;
   }
 
index bdb992f..ca843f2 100644 (file)
@@ -43,6 +43,9 @@
 
     // https://github.com/kangax/html-minifier/issues/21
     equal(minify('<a href="test.html"><div>hey</div></a>'), '<a href="test.html"><div>hey</div></a>');
+
+    // https://github.com/kangax/html-minifier/issues/17
+    equal(minify(':) <a href="http://example.com">link</a>'), ':) <a href="http://example.com">link</a>');
   });
 
   test('`minifiy` exists', function() {