Skip to content

Commit

Permalink
fix: preserve newlines in quoted values
Browse files Browse the repository at this point in the history
  • Loading branch information
schpet committed Sep 22, 2024
1 parent 7055098 commit fb45a8a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,8 @@ fn quote_value(value: &str) -> String {
quoted.push('\\');
quoted.push(c);
}
'\n' => {
quoted.push_str("\\n");
}
'\r' => {
quoted.push_str("\\r");
}
'\t' => {
quoted.push_str("\\t");
'\n' | '\r' | '\t' => {
quoted.push(c);
}
_ => {
quoted.push(c);
Expand Down

0 comments on commit fb45a8a

Please sign in to comment.