Comparing version 0.4.1 to 0.4.2
@@ -137,3 +137,3 @@ 'use strict'; | ||
if (!this.ancestor.length) { | ||
element = element.replace(/\n/g, '').replace(/\s+/g, ' '); | ||
element = element.replace(/\n/g, ' ').replace(/\s+/g, ' '); | ||
} | ||
@@ -140,0 +140,0 @@ |
{ | ||
"name": "minimize", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Minimize HTML", | ||
@@ -5,0 +5,0 @@ "main": "./lib/minimize", |
@@ -6,2 +6,3 @@ { | ||
, "code": "<code class=\"copy\">\n<span>var http = require('http');\nhttp.createServer(function (req, res) {\n res.writeHead(200, {'Content-Type': 'text/plain'});\n res.end('hello, i know nodejitsu');\n})listen(8080);</span><a href=\"#\"><s class=\"ss-layers\" role=\"presentation\"></s> copy</a></code>" | ||
, "newlines": "<li>We're <a href=\"http://nodejitsu.com\">Nodejitsu</a>, and we can give you scalable,\nfault-tolerant cloud hosting for your Node.js apps - and we're the best you'll\nfind.</li>" | ||
, "doctype": { | ||
@@ -43,4 +44,4 @@ "raw": "!doctype html" | ||
, "multiline": { | ||
"raw": "some additional lines\n\n. some random text, and alot of spaces" | ||
, "data": "some additional lines\n\n. some random text, and alot of spaces" | ||
"raw": "some additional lines.\n\n some random text, and alot of spaces" | ||
, "data": "some additional lines.\n\n some random text, and alot of spaces" | ||
, "type": "text" | ||
@@ -47,0 +48,0 @@ } |
@@ -277,3 +277,3 @@ 'use strict'; | ||
expect(helpers.text(html.multiline, '')).to.be.equal( | ||
'some additional lines\n\n. some random text, and alot of spaces' | ||
'some additional lines.\n\n some random text, and alot of spaces' | ||
); | ||
@@ -280,0 +280,0 @@ }); |
@@ -95,2 +95,9 @@ 'use strict'; | ||
it('should replace newlines between text with spaces', function (done) { | ||
minimize.minimize(html.newlines, function (result) { | ||
expect(result).to.equal("<li>We're <a href=\"http://nodejitsu.com\">Nodejitsu</a>, and we can give you scalable, fault-tolerant cloud hosting for your Node.js apps - and we're the best you'll find.</li>"); | ||
done(); | ||
}); | ||
}); | ||
it('should be configurable to retain CDATA'); | ||
@@ -97,0 +104,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29299
743