diff options
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/eval/src/value/string.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tvix/eval/src/value/string.rs b/tvix/eval/src/value/string.rs index 42d9366b958f..f352281be36a 100644 --- a/tvix/eval/src/value/string.rs +++ b/tvix/eval/src/value/string.rs @@ -92,9 +92,11 @@ impl NixString { fn nix_escape_char(ch: char) -> Option<&'static str> { match ch { - '\\' => Some("\\"), - '"' => Some("\\"), + '\\' => Some("\\\\"), + '"' => Some("\\\""), '\n' => Some("\\n"), + '\t' => Some("\\t"), + '\r' => Some("\\r"), _ => None, } } |