Skip to content

Commit

Permalink
Use LF not CRLF when calling base64::encode_config
Browse files Browse the repository at this point in the history
Closes remacs#500
  • Loading branch information
Sean 'Shaleh' Perry committed Nov 24, 2017
1 parent 35a8f4c commit e8c8e23
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rust_src/src/base64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ pub extern "C" fn base64_encode_1(
multibyte: bool,
) -> ptrdiff_t {
let config = if line_break {
base64_crate::MIME
// base64_crate::MIME, but with LF instead of CRLF
base64_crate::Config::new(
base64_crate::CharacterSet::Standard,
true, // pad
true, // strip whitespace
base64_crate::LineWrap::Wrap(76, base64_crate::LineEnding::LF),
)
} else {
base64_crate::STANDARD
};
Expand Down

0 comments on commit e8c8e23

Please sign in to comment.