Fix trim newline preserving

This commit is contained in:
Austen Adler 2022-06-09 18:11:11 -04:00
parent d6a3fccd41
commit a63ae7d0ed

View File

@ -35,9 +35,10 @@ pub fn trim(options: &Options) -> Result<String, KakError> {
}
if !options.no_preserve_newline && s.ends_with('\n') {
s + "\n"
eprintln!("Adding newline: {s:?}");
new_string.to_owned() + "\n"
} else {
new_string.to_string()
new_string.to_owned()
}
}) {
write!(f, " '{}'", i.replace('\'', "''"))?;