1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-26 05:07:41 +00:00

Add "\v" string esca[e sequence.

This commit is contained in:
Calvin Rose
2019-02-24 14:46:16 -05:00
parent 92a5567b4a
commit 602e30a421
3 changed files with 15 additions and 3 deletions

View File

@@ -136,6 +136,15 @@ static void janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, in
case '\0':
janet_buffer_push_bytes(buffer, (const uint8_t *)"\\0", 2);
break;
case '\f':
janet_buffer_push_bytes(buffer, (const uint8_t *)"\\f", 2);
break;
case '\v':
janet_buffer_push_bytes(buffer, (const uint8_t *)"\\v", 2);
break;
case 27:
janet_buffer_push_bytes(buffer, (const uint8_t *)"\\e", 2);
break;
case '\\':
janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
break;