Skip to content

Commit

Permalink
Apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Abrynos authored Mar 18, 2024
1 parent b7ae04b commit 42bd65c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Markdig/Extensions/Alerts/AlertBlockRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ protected override void Write(HtmlRenderer renderer, AlertBlock obj)
{
renderer.WriteLine("</div>");
}

renderer.EnsureLine();
}

Expand All @@ -61,6 +62,11 @@ protected override void Write(HtmlRenderer renderer, AlertBlock obj)
/// <param name="kind">The kind of the alert to render</param>
public static void DefaultRenderKind(HtmlRenderer renderer, StringSlice kind)
{
if (kind.Length >= 16)
{
return;
}

Span<char> upperKind = stackalloc char[kind.Length];
kind.AsSpan().ToUpperInvariant(upperKind);
string? html = upperKind switch
Expand Down

0 comments on commit 42bd65c

Please sign in to comment.