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); }
public void PushBlock(Block blk) { blocks.Add(new BlockRecord(fragments.Count, blk)); }
public void PushBlock(Block blk) { }
public void PushBlock(Block blk) { next.PushBlock(blk); }
public void PushBlock(Block blk) { paraPos = 0; paraWidth = targetWidth - blk.Indent * indentPerLevel; if (blk.BlockType == Block.Type.Preformatted) paraWidth = -1; consumer.PushBlock(blk); }
public void PushBlock(Block blk) { FlushFragment(); isPreformatted = (blk.BlockType == Block.Type.Preformatted); wantSpace = false; blockEmpty = true; consumer.PushBlock(blk); }
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); }
public BlockRecord(int fi, Block c) { FragmentIndex = fi; Content = c; }