Awesome Open Source
Awesome Open Source

Marked .NET

Build NuGet Version NuGet Downloads

A full-featured markdown parser and compiler, written in C#. Port of original marked javascript project.

Example of usage

Here is an example of typical using of library:

var markdown = @"
Heading
=======

Sub-heading
-----------

### Another deeper heading

Paragraphs are separated
by a blank line.

Leave 2 spaces at the end of a line to do a  
line break

Text attributes *italic*, **bold**,
`monospace`, ~~strikethrough~~ .

A [link](http://example.com).

Shopping list:

* apples
* oranges
* pears

Numbered list:

1. apples
2. oranges
3. pears
";

var marked = new Marked();
var html = marked.Parse(markdown);

Output:

<h1 id="heading">Heading</h1>
<h2 id="sub-heading">Sub-heading</h2>
<h3 id="another-deeper-heading">Another deeper heading</h3>
<p>Paragraphs are separated
by a blank line.</p>
<p>Leave 2 spaces at the end of a line to do a<br>line break</p>
<p>Text attributes <em>italic</em>, <strong>bold</strong>,
<code>monospace</code>, <del>strikethrough</del> .</p>
<p>A <a href="http://example.com">link</a>.
</p>
<p>Shopping list:</p>
<ul>
<li>apples</li>
<li>oranges</li>
<li>pears</li>
</ul>
<p>Numbered list:</p>
<ol>
<li>apples</li>
<li>oranges</li>
<li>pears</li>
</ol>

Get it on NuGet!

Install-Package MarkedNet

License

MarkedNet is under the MIT license.



Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Sharp (166,391
Markdown (28,311
Compiler (15,440
Netstandard (904
Markdown Parser (333
Markdown To Html (233