File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -423,6 +423,11 @@ fn unescape_strings() {
423
423
object_attr = {
424
424
"key\nwith\nnewlines" = true
425
425
}
426
+
427
+ heredoc = <<-EOS
428
+ some string with \
429
+ escaped newline
430
+ EOS
426
431
}
427
432
"# ;
428
433
@@ -437,6 +442,7 @@ fn unescape_strings() {
437
442
"object_attr" ,
438
443
Expression :: from_iter ( [ ( "key\n with\n newlines" , true ) ] ) ,
439
444
) )
445
+ . add_attribute ( ( "heredoc" , "some string with escaped newline\n " ) )
440
446
. build ( ) ,
441
447
)
442
448
. build ( ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ pub fn unescape(s: &str) -> Result<String> {
20
20
}
21
21
22
22
let c = match chars. next ( ) {
23
+ Some ( '\n' ) => continue ,
23
24
Some ( 'b' ) => '\u{0008}' ,
24
25
Some ( 'f' ) => '\u{000C}' ,
25
26
Some ( 'n' ) => '\n' ,
You can’t perform that action at this time.
0 commit comments