public string GetTextForContent() { var content = new StringBuilder(); content.Append(tagInfo.Text); foreach (var element in tagInfo.Content) { content.Append(HtmlMaker.FromTextInfo(element)); } content.Append(tagInfo.Tail); return(content.ToString()); }
public static string Render(string rawMarkdown) { if (string.IsNullOrEmpty(rawMarkdown)) { return(""); } var result = new StringBuilder(); foreach (var paragraph in rawMarkdown.Split(Environment.NewLine)) { var parser = new MarkdownParser(); var parsedText = parser.Parse(paragraph); result.Append(HtmlMaker.FromTextInfo(parsedText)); result.Append(Environment.NewLine); } result.Remove(result.Length - Environment.NewLine.Length, Environment.NewLine.Length); return(result.ToString()); }