Skip to content

Commit

Permalink
Replace NUL by "\0" in @TSV, closes #246.
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 committed Dec 10, 2024
1 parent 8e93028 commit f231f86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jaq-std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ fn format<V: ValT>() -> Box<[Filter<RunPtr<V>>]> {
bome(cv.1.try_as_str().map(|s| replace(s, &pats, &reps).into()))
}),
("escape_tsv", v(0), |_, cv| {
let pats = ["\n", "\r", "\t", "\\"];
let reps = ["\\n", "\\r", "\\t", "\\\\"];
let pats = ["\n", "\r", "\t", "\\", "\0"];
let reps = ["\\n", "\\r", "\\t", "\\\\", "\\0"];
bome(cv.1.try_as_str().map(|s| replace(s, &pats, &reps).into()))
}),
("encode_uri", v(0), |_, cv| {
Expand Down

0 comments on commit f231f86

Please sign in to comment.