Method ConvertAsync
- Namespace
- LMKit.Document.Conversion
- Assembly
- LM-Kit.NET.dll
ConvertAsync(string, HtmlToMarkdownOptions, CancellationToken)
Asynchronously converts HTML to Markdown.
public static Task<string> ConvertAsync(string html, HtmlToMarkdownOptions options = null, CancellationToken cancellation = default)
Parameters
htmlstringoptionsHtmlToMarkdownOptionscancellationCancellationToken
Returns
Examples
using LMKit.Document.Conversion;
string html = "<h1>Roadmap</h1><p>Ship version 2.0</p>";
string markdown = await HtmlToMarkdown.ConvertAsync(html);
Console.WriteLine(markdown);