/ByteDev.Markdown

.NET Standard library of markdown related functionality.

Primary LanguageC#MIT LicenseMIT

Build status NuGet Package License: MIT

ByteDev.Markdown

.NET Standard library of markdown related functionality.

Installation

ByteDev.Markdown has been written as a .NET Standard 2.0 library, so you can consume it from a .NET Core or .NET Framework 4.6.1 (or greater) application.

ByteDev.Markdown is hosted as a package on nuget.org. To install from the Package Manager Console in Visual Studio run:

Install-Package ByteDev.Markdown

Further details can be found on the nuget page.

Release Notes

Releases follow semantic versioning.

Full details of the release notes can be viewed on GitHub.

Usage

Md Helper

The Md helper class allows you to create markdown strings.

Reference the namespace: ByteDev.Markdown.Helper.

Md methods:

  • Italic
  • Bold
  • Strike
  • Blockquote
  • HorizontalRule
  • Header1
  • Header2
  • Header3
  • Header4
  • Header5
  • Header6
  • Code
  • CodeBlock
  • Link
  • Image
  • OrderedList
  • UnorderedList
  • TaskList
  • TableHeader
  • TableRow

Example code:

Console.Write(Md.Header1("TODO list"));
Console.Write(Md.TaskList(
    new TaskListItem("Write the theme tune", true), 
    new TaskListItem("Sing the theme tune"));

Output:

# TODO list
- [x] Write the theme tune
- [ ] Sing the theme tune