mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-05 05:09:04 +00:00
Use is null/is not null
This commit is contained in:
@@ -27,11 +27,11 @@ namespace DiscordChatExporter.Core.Markdown.Matching
|
||||
var match = matcher.TryMatch(stringPart);
|
||||
|
||||
// If there's no match - continue
|
||||
if (match == null)
|
||||
if (match is null)
|
||||
continue;
|
||||
|
||||
// If this match is earlier than previous earliest - replace
|
||||
if (earliestMatch == null || match.StringPart.StartIndex < earliestMatch.StringPart.StartIndex)
|
||||
if (earliestMatch is null || match.StringPart.StartIndex < earliestMatch.StringPart.StartIndex)
|
||||
earliestMatch = match;
|
||||
|
||||
// If the earliest match starts at the very beginning - break,
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace DiscordChatExporter.Core.Markdown.Matching
|
||||
var match = matcher.TryMatch(stringPart.Slice(currentIndex, stringPart.EndIndex - currentIndex));
|
||||
|
||||
// If there's no match - break
|
||||
if (match == null)
|
||||
if (match is null)
|
||||
break;
|
||||
|
||||
// If this match doesn't start immediately at current index - transform and yield fallback first
|
||||
|
||||
Reference in New Issue
Block a user