using Markdig.Syntax; namespace MudBlazor; internal static class HtmlBlockEx { public static bool TryGetDetails(this HtmlBlock @this, out HtmlDetailsData htmlDetailsData) { htmlDetailsData = new HtmlDetailsData(); // Closing `>` for
is missing because there might be attributes for this tag if (!@this.Lines.StartsAndEndsWith("", out var range)) return false; // Closing `>` for is missing because there might be attributes for this tag var summaryEndIndex = @this.Lines.TryGetContent("", range.Start, out var headerContent); if (summaryEndIndex.Line == -1) return false; var dataContent = @this.Lines.GetContent(summaryEndIndex, range.End); htmlDetailsData = new HtmlDetailsData(headerContent, dataContent); return true; } }