Skip to content

Commit

Permalink
fix: escape literals
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahlund committed Oct 16, 2024
1 parent 277c8ee commit e5a5cc5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion macros/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ impl<'a, 'b> Formatter<'a, 'b> {
#[inline]
pub fn write_value(&mut self, v: &'b ast::Value) -> Result {
match v {
ast::Value::LitStr(lit_str) => self.write_str(&lit_str.value()),
ast::Value::LitStr(lit_str) => {
lit_str.value().render_to(self.buf);
Ok(())
}
ast::Value::Expr(expr) => self.write_expr(expr),
}
}
Expand Down

0 comments on commit e5a5cc5

Please sign in to comment.