public static string Render(string mdText) { var builder = new MdTreeBuilder(mdText); var htmlConverter = new HtmlConverter(BasicUri); var tree = builder.BuildTree(); return(htmlConverter.Convert(tree)); }
private MdTree BuildMdTreeForOrderedList() { var mdNode = new MdNode(new OrderListTag()); var orderedLists = currentMdLine as OrderedListsLine; foreach (var textLine in orderedLists.GetListItems()) { var builder = new MdTreeBuilder(textLine); mdNode.InnerMdNodes.Add(builder.BuildTree().Root); } return(new MdTree(mdNode)); }
public static string Render(string[] mdText) { var parser = new ParserTextToMdLines(mdText); var mdLines = parser.CreateMdLines(); var builder = new StringBuilder(); var htmlConverter = new HtmlConverter(BasicUri); foreach (var mdLine in mdLines) { var treeBuilder = new MdTreeBuilder(mdLine); var tree = treeBuilder.BuildTree(); builder.AppendLine(htmlConverter.Convert(tree)); } return(builder.ToString()); }