Exemplo n.º 1
0
        public static string Render(string mdText)
        {
            var builder       = new MdTreeBuilder(mdText);
            var htmlConverter = new HtmlConverter(BasicUri);
            var tree          = builder.BuildTree();

            return(htmlConverter.Convert(tree));
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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());
        }