Merge remote-tracking branch 'origin/main' into packages

This commit is contained in:
Richard Feldman 2022-12-13 06:04:43 -05:00
commit d022c19f5c
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
24 changed files with 392 additions and 490 deletions

View file

@ -556,8 +556,13 @@ pub fn fmt_str_literal<'buf>(buf: &mut Buf<'buf>, literal: StrLiteral, indent: u
for segments in lines.iter() {
for seg in segments.iter() {
buf.indent(indent);
format_str_segment(seg, buf, indent);
// only add indent if the line isn't empty
if *seg != StrSegment::Plaintext("\n") {
buf.indent(indent);
format_str_segment(seg, buf, indent);
} else {
buf.newline();
}
}
buf.newline();