Markdown.TryGetFirstHeading Method
- Namespace
- Kampute.DocToolkit.Support
- Assembly
- Kampute.DocToolkit.dll
Definition
Attempts to find the first ATX-style heading that appears before any non-heading content in the given Markdown text.
public static bool TryGetFirstHeading(ReadOnlySpan<char> content, [NotNullWhen(true)] out string heading)Parameters
contentReadOnlySpan<char>- The Markdown content to inspect.
headingstring- When this method returns, contains the heading text if found; otherwise,
null.
