What? Markdown in your Razor code? Yeah...and it was totally easy to build too.
How to use it
This tag helper allows you to write Markdown directly in Razor and have that automatically converted to HTML at runtime. There are 2 options for how to use this tag helper. The first option is to use a
<code><markdown>This is some _simple_ **markdown**.</markdown></code>
The tag helper will take this and convert it to the following HTML:
<p>This is some <em>simple</em> <strong>markdown</strong>.</p>
The other option is to use a <p> element that has the markdown attribute:
<p markdown="">This is some _simple_ **markdown** in a _p_ element.</p>
How it works
The implementation of this tag helper is surprisingly simple. All we do is grab the contents of the tag and use MarkdownSharp to convert that to HTML.
Give it a try and let me know what you think.