Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ private void ProcessListContent(StringBuilder contents, XElement element)

private static void ProcessInlineContent(StringBuilder stringBuilder, string text, bool removeNewLines)
{
if (stringBuilder.Length > 0 && stringBuilder[stringBuilder.Length - 1] != ' ' && stringBuilder[stringBuilder.Length - 1] != '\n')
if (stringBuilder.Length > 0 && stringBuilder[^1] != ' ' && stringBuilder[^1] != '\n')
{
stringBuilder.Append(' ');
}
Expand All @@ -256,7 +256,7 @@ private static void ProcessInlineContent(StringBuilder stringBuilder, string tex

private void ProcessBlockContent(StringBuilder stringBuilder, XElement element)
{
if (stringBuilder.Length > 0 && stringBuilder[stringBuilder.Length - 1] != '\n')
if (stringBuilder.Length > 0 && stringBuilder[^1] != '\n')
{
stringBuilder.Append('\n');
}
Expand Down
2 changes: 1 addition & 1 deletion src/DendroDocs.Shared/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public static IReadOnlyList<string> NamespaceParts(this string fullName)
return [];
}

return fullName.Split(new[] { Dot }, StringSplitOptions.RemoveEmptyEntries);
return fullName.Split([Dot], StringSplitOptions.RemoveEmptyEntries);
}
}