Skip to content

Commit

Permalink
Merge branch develop v1.4.12.3823-Beta
Browse files Browse the repository at this point in the history
  • Loading branch information
anoyetta committed Apr 14, 2020
2 parents fcdb734 + 04cb823 commit 019f3ed
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CURRENT_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.4.11.3818-Stable
v1.4.12.3823-Beta
10 changes: 10 additions & 0 deletions RELEASE_NOTES.xml
Original file line number Diff line number Diff line change
Expand Up @@ -579,4 +579,14 @@
* [Minor] 話者の切り出し方法を修正した
</description>
</note>

<note>
<version>1.4.12.3823</version>
<channel>Beta</channel>
<timestamp>2020-04-14T23:45:18.5644355+09:00</timestamp>
<uri>https://github.com/anoyetta/RINGS/releases/download/v1.4.12.3823-Beta/RINGS_v1_4_12_3823_Beta.zip</uri>
<description>
* [Minor] 話者の切り出し方法を修正した
</description>
</note>
</release_notes>
16 changes: 8 additions & 8 deletions source/RINGS/Models/ChatLogModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
@":(?<speaker>[a-zA-Z\s\.\-']+):",
private static readonly Regex MessageRegex = new Regex(
@".*\u001f(?<message>[^\u001f]*)$",
RegexOptions.Compiled);

public static ChatLogModel FromXIVLog(
Expand All @@ -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(":");
Expand Down Expand Up @@ -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),

Expand Down
4 changes: 2 additions & 2 deletions source/RINGS/Version.cs
Original file line number Diff line number Diff line change
@@ -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")]

0 comments on commit 019f3ed

Please sign in to comment.