diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2022-12-30 17:02:10 +0200 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2022-12-30 17:02:10 +0200 |
commit | 660bacb9262dac7457bd8c421cc70343a0db3cd5 (patch) | |
tree | 53fbdd7bc77e2d684dab217b62ecee8d183bc4ee /melib/src/email/parser.rs | |
parent | de2f46fe611726a445c1e06cbc35343e716aa335 (diff) | |
download | meli-660bacb9262dac7457bd8c421cc70343a0db3cd5.zip |
Add `mailto` command to open composer with initial values from mailto templatemaster
Diffstat (limited to 'melib/src/email/parser.rs')
-rw-r--r-- | melib/src/email/parser.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/melib/src/email/parser.rs b/melib/src/email/parser.rs index 72f64885..efb66fa8 100644 --- a/melib/src/email/parser.rs +++ b/melib/src/email/parser.rs @@ -184,6 +184,12 @@ impl From<nom::Err<nom::error::Error<&[u8]>>> for Error { } } +impl<'i> From<ParsingError<&'i [u8]>> for nom::error::Error<&'i [u8]> { + fn from(val: ParsingError<&'i [u8]>) -> nom::error::Error<&'i [u8]> { + nom::error::Error::new(val.input, ErrorKind::Satisfy) + } +} + macro_rules! is_ctl_or_space { ($var:ident) => { /* <any ASCII control character and DEL> */ @@ -952,7 +958,7 @@ pub mod generic { let value = String::from_utf8_lossy(&input[..value_end]).to_string(); match tag { b"subject" if subject.is_none() => { - subject = Some(value); + subject = Some(value.replace("%20", " ")); } b"cc" if cc.is_none() => { cc = Some(value); |