Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 02a1e49

Browse files
committed
delete max title length
1 parent 225708c commit 02a1e49

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

build/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class BuildContext : FrostingContext
3434
public Lazy<SolutionParserResult> DefaultSln { get; set; }
3535
public const string DeployFramework = "net7.0-windows";
3636
public string PublishDir = ".dist";
37-
public string PublishVersion = "0.1.5";
37+
public string PublishVersion = "0.1.6";
3838

3939
public BuildContext(ICakeContext context)
4040
: base(context)

src/ClipboardR/Main.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public class ClipboardR : IPlugin, IDisposable, ISettingProvider, ISavable
2424
private DirectoryInfo ClipCacheDir { get; set; } = null!;
2525
private string _defaultIconPath = null!;
2626
private const int MaxDataCount = 1000;
27-
private const int MaxTitleLength = 30;
2827
private static Random _random = new();
2928
private Settings _settings = null!;
3029
private string _settingsPath = null!;
@@ -134,10 +133,7 @@ private void _OnClipboardChange(object? sender, SharpClipboard.ClipboardChangedE
134133
break;
135134
}
136135

137-
var tmpDisTitle = clipboardData.Text.Length > MaxTitleLength
138-
? clipboardData.Text[..MaxTitleLength].Trim().Replace("\n", "") + "..."
139-
: clipboardData.Text;
140-
clipboardData.DisplayTitle = Regex.Replace(tmpDisTitle, @"\s", "");
136+
clipboardData.DisplayTitle = Regex.Replace(clipboardData.Text.Trim(), @"(\r|\n|\t|\v)", "");
141137

142138
// make sure no repeat
143139
if (_dataList.Any(node => node.Equals(clipboardData)))

0 commit comments

Comments
 (0)