mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
code style
This commit is contained in:
@@ -86,7 +86,7 @@ internal sealed partial class AnnouncementService : IAnnouncementService
|
||||
foreach (ref readonly Announcement item in CollectionsMarshal.AsSpan(listWrapper.List))
|
||||
{
|
||||
item.Subtitle = new StringBuilder(item.Subtitle).Replace("\r<br>", string.Empty).ToString();
|
||||
item.Content = AnnouncementRegex.XmlTimeTagRegex.Replace(item.Content, x => x.Groups[1].Value);
|
||||
item.Content = AnnouncementRegex.XmlTimeTagRegex().Replace(item.Content, x => x.Groups[1].Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,7 +133,7 @@ internal sealed partial class AnnouncementService : IAnnouncementService
|
||||
continue;
|
||||
}
|
||||
|
||||
MatchCollection matches = AnnouncementRegex.XmlTimeTagRegex.Matches(announcement.Content);
|
||||
MatchCollection matches = AnnouncementRegex.XmlTimeTagRegex().Matches(announcement.Content);
|
||||
if (matches.Count < 2)
|
||||
{
|
||||
continue;
|
||||
|
||||
@@ -22,9 +22,6 @@ internal static partial class AnnouncementRegex
|
||||
/// <inheritdoc cref="SH.WebAnnouncementMatchPermanentActivityTime"/>
|
||||
public static readonly Regex PermanentActivityAfterUpdateTimeRegex = new(SH.WebAnnouncementMatchPermanentActivityTime, RegexOptions.Compiled);
|
||||
|
||||
/// <inheritdoc cref="XmlTagRegex"/>
|
||||
public static readonly Regex XmlTimeTagRegex = XmlTagRegex();
|
||||
|
||||
[GeneratedRegex("<t class=\"t_(?:gl|lc)\".*?>(.*?)</t>", RegexOptions.Multiline)]
|
||||
private static partial Regex XmlTagRegex();
|
||||
public static partial Regex XmlTimeTagRegex();
|
||||
}
|
||||
Reference in New Issue
Block a user