fix: remove footers from "Show Full Message..."

This commit is contained in:
link2xt
2024-11-05 20:54:18 +00:00
committed by l
parent faad576d10
commit d9d694ead0
4 changed files with 50 additions and 8 deletions

View File

@@ -21,7 +21,9 @@ pub fn escape_message_footer_marks(text: &str) -> String {
/// `footer_lines` is set to `Some` if the footer was actually removed from `lines`
/// (which is equal to the input array otherwise).
#[allow(clippy::indexing_slicing)]
fn remove_message_footer<'a>(lines: &'a [&str]) -> (&'a [&'a str], Option<&'a [&'a str]>) {
pub(crate) fn remove_message_footer<'a>(
lines: &'a [&str],
) -> (&'a [&'a str], Option<&'a [&'a str]>) {
let mut nearly_standard_footer = None;
for (ix, &line) in lines.iter().enumerate() {
match line {