1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +00:00

Pretty print tab characters as \t.

This commit is contained in:
Calvin Rose 2020-05-05 00:03:12 -05:00
parent f7b49a2c91
commit 125cd222bb

View File

@ -155,6 +155,9 @@ static void janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, in
case '\\':
janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
break;
case '\t':
janet_buffer_push_bytes(buffer, (const uint8_t *)"\\t", 2);
break;
default:
if (c < 32 || c > 126) {
uint8_t buf[4];