Markdown Class

Namespace
Kampute.DocToolkit.Support
Assembly
  • Kampute.DocToolkit.dll

Definition

Provides utility methods for encoding and decoding Markdown special characters.
public static class Markdown
Inheritance

Methods

Decode(string)Decodes escaped Markdown special characters in the given text.
Decode(ReadOnlySpan<char>, TextWriter)Decodes escaped Markdown special characters in the given text and writes the result to the specified TextWriter.
Encode(string, bool)Encodes Markdown special characters in the given text.
Encode(ReadOnlySpan<char>, TextWriter, bool)Encodes Markdown special characters in the given text and writes the result to the specified TextWriter.
EnumerateHeadings(string)Enumerates all ATX-style headings in the given Markdown content, returning their text and corresponding levels.
GetMinimumFenceBackticks(ReadOnlySpan<char>)Determines the minimum number of backticks required to fence code in Markdown.
NeedsEncoding(char, bool)Determines whether the specified character is a Markdown special character that requires escaping.
TryExtractFrontMatter(ReadOnlySpan<char>, out IReadOnlyDictionary<string, object>, out int)Attempts to extract and parse the front matter block from Markdown content.
TryGetFirstHeading(ReadOnlySpan<char>, out string)Attempts to find the first ATX-style heading that appears before any non-heading content in the given Markdown text.