diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 300ffdb..c117b98 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: - name: Install .NET uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Verify formatting run: > @@ -56,7 +56,7 @@ jobs: - name: Install .NET uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Run tests env: @@ -113,7 +113,7 @@ jobs: - name: Install .NET uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - name: Publish app run: > diff --git a/Directory.Build.props b/Directory.Build.props index 49b8aa7..bf4e026 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - net8.0 + net9.0 999.9.9-dev Tyrrrz Copyright (c) Oleksii Holub diff --git a/DiscordChatExporter.Cli.dockerfile b/DiscordChatExporter.Cli.dockerfile index 2d3351e..39f098c 100644 --- a/DiscordChatExporter.Cli.dockerfile +++ b/DiscordChatExporter.Cli.dockerfile @@ -1,7 +1,7 @@ # -- Build # Specify the platform here so that we pull the SDK image matching the host platform, # instead of the target platform specified during build by the `--platform` option. -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build # Expose the target architecture set by the `docker build --platform` option, so that # we can build the assembly for the correct platform. @@ -30,7 +30,7 @@ RUN dotnet publish DiscordChatExporter.Cli \ # -- Run # Use `runtime-deps` instead of `runtime` because we have a self-contained assembly -FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine AS run +FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime-deps:9.0-alpine AS run LABEL org.opencontainers.image.title="DiscordChatExporter.Cli" LABEL org.opencontainers.image.description="DiscordChatExporter is an application that can be used to export message history from any Discord channel to a file." diff --git a/DiscordChatExporter.Core/Markdown/Parsing/AggregateMatcher.cs b/DiscordChatExporter.Core/Markdown/Parsing/AggregateMatcher.cs index aa6597b..74b3802 100644 --- a/DiscordChatExporter.Core/Markdown/Parsing/AggregateMatcher.cs +++ b/DiscordChatExporter.Core/Markdown/Parsing/AggregateMatcher.cs @@ -3,12 +3,9 @@ namespace DiscordChatExporter.Core.Markdown.Parsing; internal class AggregateMatcher( - IReadOnlyList> matchers + params IReadOnlyList> matchers ) : IMatcher { - public AggregateMatcher(params IMatcher[] matchers) - : this((IReadOnlyList>)matchers) { } - public ParsedMatch? TryMatch(TContext context, StringSegment segment) { ParsedMatch? earliestMatch = null; @@ -28,7 +25,9 @@ internal class AggregateMatcher( earliestMatch is null || match.Segment.StartIndex < earliestMatch.Segment.StartIndex ) + { earliestMatch = match; + } // If the earliest match starts at the very beginning - break, // because it's impossible to find a match earlier than that