Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 7c9a499

Browse files
use Regex.Replace instead of string.Replace
1 parent 3096421 commit 7c9a499

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ContextActions/ClipboardRingAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class ClipboardRingAction : IContextAction
2424

2525
public ClipboardRingAction(string text)
2626
{
27-
string entry = text.Trim().Replace('\t', ' ').Replace("\r\n", " ").Replace('\r', ' ').Replace('\n', ' ');
27+
string entry = System.Text.RegularExpressions.Regex.Replace(text.Trim(), @"\s+", " ");
2828
if(entry.Length > maxLength)
2929
entry = entry.Substring(0, maxLength-endString.Length) + endString;
3030

0 commit comments

Comments
 (0)