do it better

This commit is contained in:
Paul Schneider 2017-01-24 15:07:27 +01:00
commit e24843085e
3 changed files with 61 additions and 30 deletions

View file

@ -9,7 +9,14 @@ using Microsoft.AspNet.Razor.TagHelpers;
namespace Yavsc.Helpers
{
[HtmlTargetElement("div", Attributes = MarkdownContentAttributeName)]
[HtmlTargetElement("h1", Attributes = MarkdownContentAttributeName)]
[HtmlTargetElement("h2", Attributes = MarkdownContentAttributeName)]
[HtmlTargetElement("h3", Attributes = MarkdownContentAttributeName)]
[HtmlTargetElement("p", Attributes = "ismarkdown")]
[HtmlTargetElement("div", Attributes = "ismarkdown")]
[HtmlTargetElement("h1", Attributes = "ismarkdown")]
[HtmlTargetElement("h2", Attributes = "ismarkdown")]
[HtmlTargetElement("h3", Attributes = "ismarkdown")]
[HtmlTargetElement("markdown")]
[OutputElementHint("p")]
public class MarkdownTagHelper : TagHelper