本文整理汇总了C#中MarkdownDeep.Markdown.Render方法的典型用法代码示例。如果您正苦于以下问题:C# Markdown.Render方法的具体用法?C# Markdown.Render怎么用?C# Markdown.Render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MarkdownDeep.Markdown
的用法示例。
在下文中一共展示了Markdown.Render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main(string[] args)
{
Markdown m = new Markdown();
m.SafeMode = false;
m.ExtraMode = true;
m.AutoHeadingIDs = true;
// m.SectionHeader = "<div class=\"header\">{0}</div>\n";
// m.SectionHeadingSuffix = "<div class=\"heading\">{0}</div>\n";
// m.SectionFooter = "<div class=\"footer\">{0}</div>\n\n";
// m.SectionHeader = "\n<div class=\"section_links\"><a href=\"/edit?section={0}\">Edit</a></div>\n";
// m.HtmlClassTitledImages = "figure";
// m.DocumentRoot = "C:\\users\\bradr\\desktop";
// m.DocumentLocation = "C:\\users\\bradr\\desktop\\100D5000";
// m.MaxImageWidth = 500;
m.FormatCodeBlock = FormatCodePrettyPrint;
m.ExtractHeadBlocks = true;
m.UserBreaks = true;
string markdown=FileContents("input.txt");
#if UPSTREAMSOURCE
string str = m.Transform (markdown);
Console.Write (str);
var sections = MarkdownDeep.Markdown.SplitUserSections (markdown);
for (int i = 0; i < sections.Count; i++) {
Console.WriteLine ("---- Section {0} ----", i);
Console.Write (sections [i]);
Console.Write ("\n");
}
Console.WriteLine ("------------------");
Console.WriteLine ("------Joined-------");
Console.WriteLine (MarkdownDeep.Markdown.JoinUserSections (sections));
Console.WriteLine ("------Joined-------");
Console.WriteLine ("------start head block-------");
Console.WriteLine (m.HeadBlockContent);
Console.WriteLine ("------end head block-------");
#else
Console.WriteLine ("-----------start source------------------");
Console.WriteLine (markdown);
Console.WriteLine ("------end source - start filtered -------");
Console.WriteLine (m.Render(markdown, new MarkdownRenderer()).Render());
Console.WriteLine ("-----------end filtered------------------");
#endif
}