<div>Howdy,</div><div><br></div>I'm not sure what the patch submission process is, but I have a small fix attached.<div><br></div><div>The Mail bundle's Encode Base 64 Line/Selection command does not propertly handle multiline input. This may be an issue with the underlying Ruby pack implementation, which only appears to work on the first string in the array, and calling #to_a on a string splits it at the \n character. (I've tried multiple Ruby versions on different OSes and all all fail on multiline input when using String#to_a).<div>
<br></div><div>Input:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div></div>
<div><div>Quisque gravida nulla non ante venenatis dictum. Cum</div></div><div><div>sociis natoque penatibus et magnis dis parturient montes,</div></div><div><div>nascetur ridiculus mus. Curabitur id nibh eu tortor porta</div>
</div><div><div>tincidunt nec elementum metus.</div></div></blockquote><div><br></div><div>Expected Result:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div>TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBp</div></div><div><div>c2NpbmcgZWxpdC4KUXVpc3F1ZSBncmF2aWRhIG51bGxhIG5vbiBhbnRlIHZl</div></div><div><div>bmVuYXRpcyBkaWN0dW0uIEN1bQpzb2NpaXMgbmF0b3F1ZSBwZW5hdGlidXMg</div>
</div><div><div>ZXQgbWFnbmlzIGRpcyBwYXJ0dXJpZW50IG1vbnRlcywKbmFzY2V0dXIgcmlk</div></div><div><div>aWN1bHVzIG11cy4gQ3VyYWJpdHVyIGlkIG5pYmggZXUgdG9ydG9yIHBvcnRh</div></div><div><div>CnRpbmNpZHVudCBuZWMgZWxlbWVudHVtIG1ldHVzLg==</div>
</div></blockquote><div><br></div><div>Actual Result:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBp</div>
</div><div><div>c2NpbmcgZWxpdC4K</div></div></blockquote><div><br></div><div>Result After Patch:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>
<div><div>TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBp</div></div></div><div><div><div>c2NpbmcgZWxpdC4KUXVpc3F1ZSBncmF2aWRhIG51bGxhIG5vbiBhbnRlIHZl</div></div></div><div><div><div>bmVuYXRpcyBkaWN0dW0uIEN1bQpzb2NpaXMgbmF0b3F1ZSBwZW5hdGlidXMg</div>
</div></div><div><div><div>ZXQgbWFnbmlzIGRpcyBwYXJ0dXJpZW50IG1vbnRlcywKbmFzY2V0dXIgcmlk</div></div></div><div><div><div>aWN1bHVzIG11cy4gQ3VyYWJpdHVyIGlkIG5pYmggZXUgdG9ydG9yIHBvcnRh</div></div></div><div><div><div>CnRpbmNpZHVudCBuZWMgZWxlbWVudHVtIG1ldHVzLg==</div>
</div></div></blockquote><div><br></div><div>Wrapping the return string in an array instead of using the result of #to_a works as expected. Here's the patch:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div>Index: Mail.tmbundle/Commands/Encode Base 64 Line : Selection.plist</div></div><div><div>===================================================================</div></div><div><div>8c8</div></div><div><div>< <span class="Apple-tab-span" style="white-space:pre">   </span><string>${TM_RUBY:-ruby} -e 'print STDIN.read.to_a.pack("m*")'</string></div>
</div><div><div>---</div></div><div><div>> <span class="Apple-tab-span" style="white-space:pre"> </span><string>${TM_RUBY:-ruby} -e 'print [STDIN.read].pack("m*")'</string></div></div></blockquote>
<div><div><div><br></div><div>Is there a way to get this patched in the TM Bundle trunk?</div><div><br></div><div>Please let me know if I can provide any more information.</div><div><br clear="all">Jon Hohle</div><div><a href="mailto:jonhohle@gmail.com">jonhohle@gmail.com</a><br>
<><<br>
</div></div></div></div>