diff --git a/CURRENT_VERSION b/CURRENT_VERSION index f21bde0..21a1d1e 100644 --- a/CURRENT_VERSION +++ b/CURRENT_VERSION @@ -1 +1 @@ -v1.4.11.3818-Stable +v1.4.12.3823-Beta diff --git a/RELEASE_NOTES.xml b/RELEASE_NOTES.xml index 10d9e9e..bc7143a 100644 --- a/RELEASE_NOTES.xml +++ b/RELEASE_NOTES.xml @@ -579,4 +579,14 @@ * [Minor] 話者の切り出し方法を修正した + + + 1.4.12.3823 + Beta + 2020-04-14T23:45:18.5644355+09:00 + https://github.com/anoyetta/RINGS/releases/download/v1.4.12.3823-Beta/RINGS_v1_4_12_3823_Beta.zip + + * [Minor] 話者の切り出し方法を修正した + + diff --git a/source/RINGS/Models/ChatLogModel.cs b/source/RINGS/Models/ChatLogModel.cs index 6117789..7c905f1 100644 --- a/source/RINGS/Models/ChatLogModel.cs +++ b/source/RINGS/Models/ChatLogModel.cs @@ -640,10 +640,8 @@ public ChatChannelSettingsModel ChannelSettings public override string ToString() => $"{this.chatCode}:{this.speaker}:{this.message}"; - private static readonly string SpeakerDelimiter = "\u001f"; - - private static readonly Regex SpeackerRegex = new Regex( - @":(?[a-zA-Z\s\.\-']+):", + private static readonly Regex MessageRegex = new Regex( + @".*\u001f(?[^\u001f]*)$", RegexOptions.Compiled); public static ChatLogModel FromXIVLog( @@ -662,12 +660,11 @@ public static ChatLogModel FromXIVLog( var chatLogLine = xivLog.Line; - var replacedRaw = xivLog.Raw.Replace(SpeakerDelimiter, ":"); - var match = SpeackerRegex.Match(replacedRaw); + var match = MessageRegex.Match(xivLog.Raw); if (match.Success) { - var name = match.Groups["speaker"].Value; - chatLogLine = chatLogLine.Replace(name, $"{name}:"); + var message = match.Groups["message"].Value; + chatLogLine = chatLogLine.Replace(message, $":{message}"); } var i = chatLogLine.IndexOf(":"); @@ -803,6 +800,9 @@ private static string FomartCharacterNames( private static readonly Regex[] SpecialCharRegexList = new[] { + // Unicodeの記号 + new Regex("[\u0000-\u001F]", RegexOptions.Compiled), + // Unicodeのその他の記号(Miscellaneous Symbols) new Regex("[\u2600-\u26FF]", RegexOptions.Compiled), diff --git a/source/RINGS/Version.cs b/source/RINGS/Version.cs index 992cd2c..820743a 100644 --- a/source/RINGS/Version.cs +++ b/source/RINGS/Version.cs @@ -1,4 +1,4 @@ using System.Reflection; -[assembly: AssemblyVersion("1.4.11.3818")] -[assembly: AssemblyConfiguration("Stable")] +[assembly: AssemblyVersion("1.4.12.3823")] +[assembly: AssemblyConfiguration("Beta")]