Skip to content

Commit 2555d24

Browse files
authored
Treat \n and \r same as other escaped characters
b'\n' and b'\r' should be serialized to '\\a ' and '\\d ' respectively, rather than '\\A ' and '\\D '. Simply let them be treated the same way as other escaped character should be fine.
1 parent af83617 commit 2555d24

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/serializer.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,6 @@ impl<'a, W> fmt::Write for CssStringWriter<'a, W> where W: fmt::Write {
253253
let escaped = match b {
254254
b'"' => Some("\\\""),
255255
b'\\' => Some("\\\\"),
256-
b'\n' => Some("\\A "),
257-
b'\r' => Some("\\D "),
258256
b'\0' => Some("\u{FFFD}"),
259257
b'\x01'...b'\x1F' | b'\x7F' => None,
260258
_ => continue,

0 commit comments

Comments
 (0)