Move to new interpolation syntax

This commit is contained in:
Sam Mohr 2025-01-10 10:18:15 -08:00
parent a69a326161
commit eb1b5ffa26
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
68 changed files with 665 additions and 633 deletions

View file

@ -922,8 +922,8 @@ fn format_str_segment(seg: &StrSegment, buf: &mut Buf) {
buf.push(escaped.to_parsed_char());
}
Interpolated(loc_expr) => {
buf.push_str("$(");
// e.g. (name) in "Hi, $(name)!"
buf.push_str("${");
// e.g. {name} in "Hi, ${name}!"
let min_indent = buf.cur_line_indent() + INDENT;
loc_expr.value.format_with_options(
buf,
@ -932,7 +932,7 @@ fn format_str_segment(seg: &StrSegment, buf: &mut Buf) {
min_indent,
);
buf.indent(min_indent);
buf.push(')');
buf.push('}');
}
}
}