Skip to content

Commit

Permalink
Removed mistaken bracket in text replace operation
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoe-chan authored Mar 15, 2024
1 parent 845e3b4 commit e0ade32
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ string EscapeText(string text)
// as single-byte or multiple-byte character codes.

// Note: order of replacing is important. Replace slash first before brackets.
text = text.Replace(@"\", @"\\)"); // Escape any slash '\' -> '\\'
text = text.Replace(@"\", @"\\"); // Escape any slash '\' -> '\\'
text = text.Replace("(", @"\("); // Escape any open brackets '(' -> '\('
text = text.Replace(")", @"\)"); // Escape any close brackets ')' -> '\)'

Expand Down Expand Up @@ -114,4 +114,4 @@ public override string ToString()
return $"{Text} {Symbol}";
}
}
}
}

0 comments on commit e0ade32

Please sign in to comment.