Example #1
0
        void EmitBlock()
        {
            var blk = new Block();

            blk.BlockType = depPre > 0 ?
            Block.Type.Preformatted : Block.Type.Paragraph;
            blk.Indent = depBlockquote + depPre + depList;

            if (bulletStart)
            {
            ListEnv env = new ListEnv(ListState.Unordered);

            if (stkList.Count > 0)
            env = stkList.Peek();

            bulletStart = false;

            switch (env.State)
            {
            case ListState.Unordered:
            blk.Prefix = "*";
            break;

            case ListState.Ordered:
            blk.Prefix = XmlConvert.ToString(env.ItemCount) + ".";
            break;

            case ListState.Definition:
            blk.Prefix = "~";
            break;
            }
            }

            consumer.PushBlock(blk);
        }
Example #2
0
 public void PushBlock(Block blk)
 {
     blocks.Add(new BlockRecord(fragments.Count, blk));
 }
Example #3
0
 public void PushBlock(Block blk)
 {
 }
Example #4
0
 public void PushBlock(Block blk)
 {
     next.PushBlock(blk);
 }
Example #5
0
        public void PushBlock(Block blk)
        {
            paraPos = 0;
            paraWidth = targetWidth - blk.Indent * indentPerLevel;

            if (blk.BlockType == Block.Type.Preformatted)
            paraWidth = -1;

            consumer.PushBlock(blk);
        }
Example #6
0
        public void PushBlock(Block blk)
        {
            FlushFragment();

            isPreformatted = (blk.BlockType == Block.Type.Preformatted);
            wantSpace = false;
            blockEmpty = true;

            consumer.PushBlock(blk);
        }
Example #7
0
        public void PushBlock(Block blk)
        {
            if (!lineEmpty)
            consumer.PushFragment(new Fragment() {
            Attr = Fragment.Attributes.NewLine
            });

            if (!blockEmpty)
            consumer.PushFragment(new Fragment() {
            Attr = Fragment.Attributes.NewLine
            });

            blockEmpty = true;
            lineEmpty = true;
            paraPrefix = blk.Prefix;
            paraIndent = indentPerLevel * blk.Indent;

            consumer.PushBlock(blk);
        }
Example #8
0
 public BlockRecord(int fi, Block c)
 {
     FragmentIndex = fi;
     Content = c;
 }