mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-10 20:02:31 +00:00
Use .NET 9
This commit is contained in:
@@ -3,12 +3,9 @@
|
||||
namespace DiscordChatExporter.Core.Markdown.Parsing;
|
||||
|
||||
internal class AggregateMatcher<TContext, TValue>(
|
||||
IReadOnlyList<IMatcher<TContext, TValue>> matchers
|
||||
params IReadOnlyList<IMatcher<TContext, TValue>> matchers
|
||||
) : IMatcher<TContext, TValue>
|
||||
{
|
||||
public AggregateMatcher(params IMatcher<TContext, TValue>[] matchers)
|
||||
: this((IReadOnlyList<IMatcher<TContext, TValue>>)matchers) { }
|
||||
|
||||
public ParsedMatch<TValue>? TryMatch(TContext context, StringSegment segment)
|
||||
{
|
||||
ParsedMatch<TValue>? earliestMatch = null;
|
||||
@@ -28,7 +25,9 @@ internal class AggregateMatcher<TContext, TValue>(
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user