Skip to content

Commit e51fd46

Browse files
梶塚太智thejustcube
authored andcommitted
Add string escape
modified: src/main.rs
1 parent 8a1a9e7 commit e51fd46

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/main.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,21 @@ impl Executor {
287287
_ => {
288288
if parentheses == 0 && brackets == 0 && !hash {
289289
if escape {
290+
<<<<<<< HEAD
290291
match c {
291292
'n' => buffer.push_str("\\n"),
292293
't' => buffer.push_str("\\t"),
293294
'r' => buffer.push_str("\\r"),
294295
_ => buffer.push(c),
295296
}
297+
=======
298+
buffer.push(match c {
299+
'n' => '\n',
300+
't' => '\t',
301+
'r' => '\r',
302+
_ => c,
303+
})
304+
>>>>>>> e0ee7bf (Add string escape)
296305
} else {
297306
buffer.push(c);
298307
}
@@ -374,12 +383,21 @@ impl Executor {
374383
_ => {
375384
if parentheses == 0 && brackets == 0 && !hash {
376385
if escape {
386+
<<<<<<< HEAD
377387
match c {
378388
'n' => buffer.push_str("\\n"),
379389
't' => buffer.push_str("\\t"),
380390
'r' => buffer.push_str("\\r"),
381391
_ => buffer.push(c),
382392
}
393+
=======
394+
buffer.push(match c {
395+
'n' => '\n',
396+
't' => '\t',
397+
'r' => '\r',
398+
_ => c,
399+
})
400+
>>>>>>> e0ee7bf (Add string escape)
383401
} else {
384402
buffer.push(c);
385403
}

0 commit comments

Comments
 (0)