bump: net8.0 -> net9.0
All checks were successful
Build blog docker image / Build-Blog-Image (push) Successful in 3m23s
All checks were successful
Build blog docker image / Build-Blog-Image (push) Successful in 3m23s
This commit is contained in:
@@ -133,13 +133,12 @@ public partial class EssayScanService(
|
||||
private static Task<ImageScanResult> ScanUnusedImagesInternal(IEnumerable<BlogContent> contents,
|
||||
DirectoryInfo root)
|
||||
{
|
||||
Regex imageRegex = ImageRegex();
|
||||
ConcurrentBag<FileInfo> unusedImage = [];
|
||||
ConcurrentBag<FileInfo> notFoundImage = [];
|
||||
|
||||
Parallel.ForEach(contents, content =>
|
||||
{
|
||||
MatchCollection result = imageRegex.Matches(content.FileContent);
|
||||
MatchCollection result = ImagePattern.Matches(content.FileContent);
|
||||
DirectoryInfo imageDirectory = new(Path.Combine(root.FullName, content.FileName));
|
||||
|
||||
Dictionary<string, bool> usedDictionary;
|
||||
@@ -182,7 +181,7 @@ public partial class EssayScanService(
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"\!\[.*?\]\((.*?)\)")]
|
||||
private static partial Regex ImageRegex();
|
||||
private static partial Regex ImagePattern { get; }
|
||||
|
||||
private void ValidateDirectory(string root, out DirectoryInfo drafts, out DirectoryInfo posts)
|
||||
{
|
||||
|
@@ -136,7 +136,8 @@ public partial class RendererService(
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"(?<!\\)[^\#\*_\-\+\`{}\[\]!~]+")]
|
||||
private static partial Regex DescriptionPattern();
|
||||
// private static partial Regex DescriptionPattern();
|
||||
private static partial Regex DescriptionPattern { get; }
|
||||
|
||||
private string GetDescription(BlogContent content)
|
||||
{
|
||||
@@ -152,7 +153,7 @@ public partial class RendererService(
|
||||
}
|
||||
|
||||
string rawContent = content.FileContent[..pos];
|
||||
MatchCollection matches = DescriptionPattern().Matches(rawContent);
|
||||
MatchCollection matches = DescriptionPattern.Matches(rawContent);
|
||||
|
||||
StringBuilder builder = new();
|
||||
foreach (Match match in matches)
|
||||
|
Reference in New Issue
Block a user