HtmlToMarkdownConverter 2.0.2
dotnet add package HtmlToMarkdownConverter --version 2.0.2
NuGet\Install-Package HtmlToMarkdownConverter -Version 2.0.2
<PackageReference Include="HtmlToMarkdownConverter" Version="2.0.2" />
<PackageVersion Include="HtmlToMarkdownConverter" Version="2.0.2" />
<PackageReference Include="HtmlToMarkdownConverter" />
paket add HtmlToMarkdownConverter --version 2.0.2
#r "nuget: HtmlToMarkdownConverter, 2.0.2"
#addin nuget:?package=HtmlToMarkdownConverter&version=2.0.2
#tool nuget:?package=HtmlToMarkdownConverter&version=2.0.2
HTML to Markdown Converter
HTML to Markdown Converter is a powerful tool designed to seamlessly convert HTML strings into Markdown format. This library has no external dependencies, making it lightweight and easy to integrate into your projects. This tool simplifies the process of transforming HTML content into clean, readable Markdown, making it perfect for developers, writers, and content creators.
Features
- Easy Conversion: Quickly convert HTML strings to Markdown with minimal effort.
- Accurate Formatting: Ensures that the converted Markdown retains the structure and style of the original HTML.
- Open Source: Available for free and open for contributions.
Installation
To install the tool, use the following command:
dotnet add package HtmlToMarkdownConverter
Breaking Changes in v2.0.0
Updated Usage (v2.0.0)
string htmlContent = "<p>Hello, World!</p>";
var result = ConversionService.ConvertHtmlToMarkdown(htmlContent);
string outputString = result.Markdown;
List<string> errorLogs = result.Errors;
What Changed?
Static Method Implementation:
The
ConversionService
is now replaced with Static class, offering a static method for improved simplicity.The
ConvertHtmlToMarkdown
method now returns a Result object containing both the Markdown string and error logs.
Result Object:
- Instead of separate methods for
ConvertHtmlToMarkdown
andGetErrorLogs
, these are now combined into a single static call returning a structured object.
- Instead of separate methods for
Namespace has been updated
- From
v2.0.0
the namespace isHtmlToMarkdown.Service
previously it wasHtmlToMarkdownService
.
- From
Previous Usage (<=v1.0.9)
using HtmlToMarkdownService;
var conversionService = new ConversionService();
string htmlContent = "<p>Hello, World!</p>";
string markdownContent = conversionService.ConvertHtmlToMarkdown(htmlContent);
List<string> errorLogs = conversionService.GetErrorLogs();
Usage
var result = ConversionService.ConvertHtmlToMarkdown("<p>Hello, World!</p>");
Console.WriteLine(result.Markdown);
if (result.Errors.Any())
{
Console.WriteLine("Conversion Errors:");
result.Errors.ForEach(Console.WriteLine);
}
ConversionService Class
The ConversionService class provides methods to convert HTML to Markdown and to retrieve error logs.
ConvertHtmlToMarkdown Method
This method converts HTML content to Markdown.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Contact
For any questions or feedback, please contact info@bluecomment.com.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- Enhanced HTML table conversion for more accurate markdown representation.
- Improved support for list conversion inside tables, including nested lists.
- Refinements in table header handling for better markdown output.
- Optimized performance with bug fixes and stability improvements.
- Updates test cases with enhanced error detection and coverage.