fix new lines skip condition

This commit is contained in:
yggverse 2025-02-15 21:07:01 +02:00
parent e1cb4f9b99
commit f3dc550c2e

View file

@ -43,19 +43,16 @@ impl Multiline {
return Err(Error::Completed);
}
// Append to value, trim close tag on exists
self.value.push_str(line.trim_end_matches(TAG));
// Line contain close tag
if line.ends_with(TAG) {
self.completed = true;
}
// Prepend new line before next lines only
if !self.value.is_empty() {
} else {
self.value.push(NEW_LINE);
}
// Append to value, trim close tag on exists
self.value.push_str(line.trim_end_matches(TAG));
Ok(())
}
}