Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 456731d

Browse files
fix: maintain non-escaped new lines, returns and tabs in single quoted strings
1 parent 9b9fa5b commit 456731d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lexer/byte_string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl std::fmt::Display for ByteString {
3333
for &b in &self.bytes {
3434
match b {
3535
0 => write!(f, "\\0")?,
36-
b'\n' | b'\r' | b'\t' => write!(f, "{}", b.escape_ascii())?,
36+
b'\n' | b'\r' | b'\t' => write!(f, "{}", b as char)?,
3737
0x01..=0x19 | 0x7f..=0xff => write!(f, "\\x{:02x}", b)?,
3838
_ => write!(f, "{}", b as char)?,
3939
}

0 commit comments

Comments
 (0)