Fix problem of newlines without carriage returns.
This commit is contained in:
parent
5e171f4b86
commit
bbf80db343
@ -75,7 +75,7 @@ pub async fn describe_normal_item(
|
||||
phrases.push(details);
|
||||
}
|
||||
let phrases_str: Vec<&str> = phrases.iter().map(|p| p.as_str()).collect();
|
||||
contents_desc.push_str(&(language::join_words(&phrases_str) + ".\n"));
|
||||
contents_desc.push_str(&(language::join_words(&phrases_str) + ".\r\n"));
|
||||
}
|
||||
|
||||
if let Some(liq_data) = item
|
||||
@ -109,10 +109,10 @@ pub async fn describe_normal_item(
|
||||
(Some((&LiquidType::Water, _)), None) => contents_desc.push_str("water"),
|
||||
_ => contents_desc.push_str("mixed fluids"),
|
||||
}
|
||||
contents_desc.push_str(".\n");
|
||||
contents_desc.push_str(".\r\n");
|
||||
}
|
||||
|
||||
_ => contents_desc.push_str("It's completely dry.\n"),
|
||||
_ => contents_desc.push_str("It's completely dry.\r\n"),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ async fn process_sendqueue_once(pool: db::DBPool, listener_map: ListenerMap) ->
|
||||
},
|
||||
Some(msg) => MessageToListener::SendToSession {
|
||||
session: item.session.session.clone(),
|
||||
msg: msg,
|
||||
msg: msg.replace('\r', "").replace('\n', "\r\n"),
|
||||
},
|
||||
},
|
||||
ack_notify: tx,
|
||||
|
Loading…
Reference in New Issue
Block a user