Skip to content

Commit

Permalink
Fix Literal::as_string() stripping indentation. (#11)
Browse files Browse the repository at this point in the history
This level of the abstraction should not concern itself with trimming
whitespace. It's up to the caller to make that decision.
  • Loading branch information
parasyte committed Feb 10, 2024
1 parent 2c1c41b commit 2d9c3ab
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ impl LiteralExt for Literal {

// Strip double quotes and escapes.
Ok(string[1..string.len() - 1]
.trim()
.replace(r#"\""#, r#"""#)
.replace(r"\n", "\n")
.replace(r"\r", "\r")
Expand Down

0 comments on commit 2d9c3ab

Please sign in to comment.