示例#1
0
        protected override void Write(NormalizeRenderer renderer, HeadingBlock obj)
        {
            var headingText = obj.Level > 0 && obj.Level <= 6
                ? HeadingTexts[obj.Level - 1]
                : new string('#', obj.Level);

            renderer.Write(headingText).Write(' ');
            renderer.WriteLeafInline(obj);

            renderer.FinishBlock(renderer.Options.EmptyLineAfterHeading);
        }
示例#2
0
 protected override void Write(NormalizeRenderer renderer, ParagraphBlock obj)
 {
     renderer.WriteLeafInline(obj);
     renderer.FinishBlock(!renderer.CompactParagraph);
 }