Skip to content

Commit 4c7f595

Browse files
committed
From review: use raw strings for find/replace when quoting a string.
1 parent 451c907 commit 4c7f595

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/_StringProcessing/PrintAsPattern.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ extension PrettyPrinter {
578578
extension String {
579579
// TODO: Escaping?
580580
fileprivate var _quoted: String {
581-
"\"\(self._replacing("\\", with: "\\\\")._replacing("\"", with: "\\\""))\""
581+
"\"\(self._replacing(#"\"#, with: #"\\"#)._replacing(#"""#, with: #"\""#))\""
582582
}
583583
}
584584

0 commit comments

Comments
 (0)