예제 #1
0
        }         // func GetStyleKey

        protected override void Write(XamlMarkdownWriter renderer, HeadingBlock headingBlock)
        {
            renderer.WriteStartObject(typeof(Paragraph));
            renderer.WriteResourceMember(null, GetStyleKey(headingBlock.Level));
            renderer.WriteItems(headingBlock);
            renderer.WriteEndObject();
        } // proc Write
예제 #2
0
        protected override void Write(XamlMarkdownWriter renderer, ListBlock listBlock)
        {
            renderer.WriteStartObject(typeof(List));

            if (listBlock.IsOrdered)
            {
                renderer.WriteMember(List.MarkerStyleProperty, TextMarkerStyle.Decimal);

                if (listBlock.OrderedStart != null && (listBlock.DefaultOrderedStart != listBlock.OrderedStart))
                {
                    renderer.WriteMember(List.StartIndexProperty, listBlock.OrderedStart);
                }
            }
            else
            {
                renderer.WriteMember(List.MarkerStyleProperty, TextMarkerStyle.Disc);
            }

            renderer.WriteStartItems(nameof(List.ListItems));

            foreach (var cur in listBlock)
            {
                renderer.WriteStartObject(typeof(ListItem));
                renderer.WriteItems((ContainerBlock)cur);
                renderer.WriteEndObject();
            }

            renderer.WriteEndItems();
            renderer.WriteEndObject();
        } // proc Write
예제 #3
0
 protected override void Write(XamlMarkdownWriter renderer, CodeBlock obj)
 {
     renderer.WriteStartObject(typeof(Paragraph));
     renderer.WriteResourceMember(null, MarkdownXamlStyle.CodeBlock);
     //if (obj is FencedCodeBlock f)
     //    f.Info;
     renderer.WriteItems(obj, true);
     renderer.WriteEndObject();
 } // proc Write
예제 #4
0
        protected override void Write(XamlMarkdownWriter renderer, QuoteBlock block)
        {
            renderer.WriteStartObject(typeof(Section));
            renderer.WriteResourceMember(null, MarkdownXamlStyle.QuoteBlock);

            renderer.WriteItems(block);

            renderer.WriteEndObject();
        } // proc Write
예제 #5
0
 protected override void Write(XamlMarkdownWriter renderer, ParagraphBlock paragraph)
 {
     renderer.WriteStartObject(typeof(Paragraph));
     renderer.WriteItems(paragraph);
     renderer.WriteEndObject();
 } // proc Write