Skip to content

Commit 6dda460

Browse files
committed
Escape non-printable ident code with hex
1 parent b5b2530 commit 6dda460

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parse-css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ function escapeIdent(string) {
761761
}
762762

763763
function escapeIdentCode(code) {
764-
if(digit(code) || letter(code)) {
764+
if(digit(code) || letter(code) || between(code, 0, 0x1f) || code == 0x7f) {
765765
return `\\${code.toString(16)} `;
766766
}
767767
return "\\"+String.fromCodePoint(code);

0 commit comments

Comments
 (0)