An open API service indexing awesome lists of open source software.

https://github.com/soenneker/soenneker.extensions.string.markdown

A collection of helpful markdown string extension methods
https://github.com/soenneker/soenneker.extensions.string.markdown

csharp dotnet extension extensions markdown markdownstringextension string

Last synced: 2 months ago
JSON representation

A collection of helpful markdown string extension methods

Awesome Lists containing this project

README

          

[![](https://img.shields.io/nuget/v/soenneker.extensions.string.markdown.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.extensions.string.markdown/)
[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.extensions.string.markdown/publish-package.yml?style=for-the-badge)](https://github.com/soenneker/soenneker.extensions.string.markdown/actions/workflows/publish-package.yml)
[![](https://img.shields.io/nuget/dt/soenneker.extensions.string.markdown.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.extensions.string.markdown/)
[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.extensions.string.markdown/codeql.yml?label=CodeQL&style=for-the-badge)](https://github.com/soenneker/soenneker.extensions.string.markdown/actions/workflows/codeql.yml)

# ![](https://user-images.githubusercontent.com/4441470/224455560-91ed3ee7-f510-4041-a8d2-3fc093025112.png) Soenneker.Extensions.String.Markdown
### A collection of helpful markdown string extension methods

## Installation

```
dotnet add package Soenneker.Extensions.String.Markdown
```

## Examples

### `ToHtml()`

```csharp
string markdown = "# Hello, World!";
string html = markdown.ToHtml();
Console.WriteLine(html); // Output:

Hello, World!


```

*Converts a Markdown string to an HTML string.*

### `ToHtmlMarkup()`

```csharp
string markdown = "# Hello, World!";
MarkupString htmlMarkup = markdown.ToHtmlMarkup();
Console.WriteLine(htmlMarkup); // Output:

Hello, World!


```

*Converts a Markdown string to an HTML `MarkupString`.*