15 lines
No EOL
346 B
C#
15 lines
No EOL
346 B
C#
using System;
|
|
using Markdig;
|
|
using Markdig.SyntaxHighlighting;
|
|
using Website.Models;
|
|
|
|
namespace Website.ViewModels
|
|
{
|
|
public class BlogPostPreviewViewModel:BlogPostViewModel
|
|
{
|
|
public BlogPostPreviewViewModel(BlogPost blogPost):base(blogPost)
|
|
{
|
|
Content = Markdown.ToHtml(blogPost.Content.Substring(0, 1000), GetPipeline()).Trim();
|
|
}
|
|
}
|
|
} |