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
- Host: GitHub
- URL: https://github.com/soenneker/soenneker.extensions.string.markdown
- Owner: soenneker
- License: mit
- Created: 2024-07-13T22:07:10.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-02-27T09:27:32.000Z (4 months ago)
- Last Synced: 2026-02-27T10:40:33.162Z (4 months ago)
- Topics: csharp, dotnet, extension, extensions, markdown, markdownstringextension, string
- Language: C#
- Homepage: https://soenneker.com
- Size: 947 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
[](https://www.nuget.org/packages/soenneker.extensions.string.markdown/)
[](https://github.com/soenneker/soenneker.extensions.string.markdown/actions/workflows/publish-package.yml)
[](https://www.nuget.org/packages/soenneker.extensions.string.markdown/)
[](https://github.com/soenneker/soenneker.extensions.string.markdown/actions/workflows/codeql.yml)
#  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`.*