Comparing version 0.3.6 to 0.3.7
{ | ||
"name": "mailbuild", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"homepage": "https://github.com/whiteout-io/mailbuild", | ||
@@ -5,0 +5,0 @@ "description": "mailbuild is a low level rfc2822 message composer. Define your own mime tree, no magic included.", |
@@ -450,3 +450,3 @@ // Copyright (c) 2013 Andris Reinman | ||
if (flowed) { | ||
lines.push(mimefuncs.foldLines(this.content. | ||
lines.push(mimefuncs.foldLines(this.content.replace(/\r?\n/g, '\r\n'). | ||
// space stuffing http://tools.ietf.org/html/rfc3676#section-4.2 | ||
@@ -456,3 +456,3 @@ replace(/^( |From|>)/igm, ' $1'), | ||
} else { | ||
lines.push(this.content); | ||
lines.push(this.content.replace(/\r?\n/g, '\r\n')); | ||
} | ||
@@ -459,0 +459,0 @@ } |
@@ -334,2 +334,10 @@ 'use strict'; | ||
it('should convert 7bit newlines', function() { | ||
var msg = new Mailbuild('text/plain'). | ||
setContent('tere\ntere'). | ||
build(); | ||
expect(/\r\n\r\ntere\r\ntere$/.test(msg)).to.be.true; | ||
}); | ||
it('should encode 7bit text', function() { | ||
@@ -352,3 +360,3 @@ var msg = new Mailbuild('text/plain'). | ||
var msg = new Mailbuild('text/plain; format=flowed'). | ||
setContent('tere\r\nFrom\r\n Hello\r\n> abc\r\nabc'). | ||
setContent('tere\r\nFrom\r\n Hello\r\n> abc\nabc'). | ||
build(); | ||
@@ -355,0 +363,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
74915
1406