Skip to content

Commit 896b23a

Browse files
committed
Fix pretty-printing of imports
1 parent 555a32c commit 896b23a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

core/src/bytecode/pretty.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,9 @@ impl<'a> Pretty<'a, Allocator> for &Node<'_> {
995995
allocator,
996996
"import",
997997
allocator.space(),
998-
allocator.as_string(path.to_string_lossy()).double_quotes(),
998+
allocator
999+
.escaped_string(path.to_string_lossy().as_ref())
1000+
.double_quotes(),
9991001
if Some(*format) != InputFormat::from_path(path) {
10001002
docs![
10011003
allocator,

core/src/pretty.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,9 @@ impl<'a> Pretty<'a, Allocator> for &Term {
11571157
allocator,
11581158
"import",
11591159
allocator.space(),
1160-
allocator.as_string(path.to_string_lossy()).double_quotes(),
1160+
allocator
1161+
.escaped_string(path.to_string_lossy().as_ref())
1162+
.double_quotes(),
11611163
if Some(*format) != InputFormat::from_path(path) {
11621164
docs![
11631165
allocator,

0 commit comments

Comments
 (0)