From c99131f551eb2f0d5787763e448753ccf0401e17 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Sun, 22 Mar 2020 21:08:21 +0100 Subject: [PATCH] change string style --- src/export_chat.rs | 56 ++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/src/export_chat.rs b/src/export_chat.rs index 1cf042eb1..e6bfa262a 100644 --- a/src/export_chat.rs +++ b/src/export_chat.rs @@ -126,22 +126,22 @@ fn message_to_html(author_cache: &HashMap, message: Message) - let avatar: String = { if let Some(profile_img) = &author.profile_img { format!( - r#"
- {author_name} -
"#, + "
\ + \ +
", author_name = author.name, author_avatar_src = profile_img ) } else { format!( - r#"
-
- {initial} -
-
"#, + "
\ +
\ + {initial}\ +
\ +
", name = author.name, initial = author.initial, color = author.color @@ -154,22 +154,24 @@ fn message_to_html(author_cache: &HashMap, message: Message) - //todo support images / voice message / attachments format!( - r#"
  • - {avatar} -
    - {author_name} -
    -
    - {content} -
    - -
    -
    -
  • "#, + "
  • \ +
    \ + {avatar}\ +
    \ + {author_name}\ +
    \ +
    \ + {content}\ +
    \ +
    \ + {encryption}\ + {relative_time}\ + \ +
    \ +
    \ +
    \ +
    \ +
  • ", direction = match message.from_id == DC_CONTACT_ID_SELF { true => "outgoing", false => "incomming",