Skip to content

Commit

Permalink
Merge pull request #2 from jonahlund/fix-literal-escaping
Browse files Browse the repository at this point in the history
fix: escape literals
  • Loading branch information
jonahlund authored Oct 16, 2024
2 parents 277c8ee + e5a5cc5 commit d76b5ae
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 d76b5ae

Please sign in to comment.